Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

edx-modulestore

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edx-modulestore - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

18

lib/course.js

@@ -56,6 +56,2 @@ var Q = require('q');

Course.prototype.__defineGetter__('id', function () {
return this.get('_id.course');
});
Course.prototype.__defineGetter__('longId', function () {
var _id = this.get('_id');

@@ -70,11 +66,4 @@

Course.prototype.__defineGetter__('fullId', function () {
var _id = this.get('_id');
return _id.tag + '://' + [
_id.org,
_id.course,
_id.category,
_id.name
].join('/');
Course.prototype.__defineGetter__('shortId', function () {
return this.get('_id.course');
});

@@ -194,4 +183,3 @@

id: this.id,
longId: this.longId,
fullId: this.fullId,
shortId: this.shortId,
state: this.state,

@@ -198,0 +186,0 @@ name: this.name,

35

lib/modulestore.js

@@ -122,17 +122,24 @@ var Q = require('q');

Module(this.connection).findOne({
'_id.category': 'course',
'_id.course': id
}, function (err, course) {
if (err) {
deferred.reject(new Error(err));
}
else {
var c = new Course(self, course);
var elements = id.split('/');
if (elements.length !== 3) {
deferred.reject(new Error('Invalid course ID'));
}
else {
Module(this.connection).findOne({
'_id.org': elements[0],
'_id.course': elements[1],
'_id.name': elements[2]
}, function (err, course) {
if (err) {
deferred.reject(new Error(err));
}
else {
var c = new Course(self, course);
c.fetchAboutData().then(function () {
deferred.resolve(c);
});
}
});
c.fetchAboutData().then(function () {
deferred.resolve(c);
});
}
});
}
return deferred.promise;

@@ -139,0 +146,0 @@ };

{
"name": "edx-modulestore",
"version": "0.0.6",
"version": "0.0.7",
"description": "Easy browsing of Open edX modulestores",

@@ -5,0 +5,0 @@ "author": "Bertrand Marron",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc