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 2.6.0 to 2.7.0

2

lib/index.js

@@ -67,2 +67,4 @@ 'use strict';

models.cleanup();
this.removeAllListeners(this.connection);

@@ -69,0 +71,0 @@ delete this.connection;

29

lib/models/index.js
'use strict';
var mongoose = require('mongoose');
var mongoose = require('mongoose');

@@ -8,8 +8,8 @@ // Register `Long' type

var ModuleSchema = require('./module');
var CourseSchema = require('./course');
var AboutSchema = require('./about');
var ChapterSchema = require('./chapter');
var ModuleSchema = require('./module');
var CourseSchema = require('./course');
var AboutSchema = require('./about');
var ChapterSchema = require('./chapter');
var SequentialSchema = require('./sequential');
var ProblemSchema = require('./problem');
var ProblemSchema = require('./problem');

@@ -22,2 +22,3 @@ // ## //

Module = connection.model('Module', ModuleSchema);
Course = Module.discriminator('course', CourseSchema);

@@ -30,5 +31,21 @@ About = Module.discriminator('about', AboutSchema);

var cleanup = function () {
// This removes the discriminatorKey from the schemas.
// We’re doing this to make sure that the schema/models
// are re-usable.
// Model.discriminator will call Schema.add() with the
// configured discriminatorKey. Calling Model.discriminator()
// when the discriminatorKey is already defined will fail.
CourseSchema.remove(CourseSchema.options.discriminatorKey);
AboutSchema.remove(AboutSchema.options.discriminatorKey);
ChapterSchema.remove(ChapterSchema.options.discriminatorKey);
SequentialSchema.remove(SequentialSchema.options.discriminatorKey);
ProblemSchema.remove(ProblemSchema.options.discriminatorKey);
};
// ## //
exports.setup = setup;
exports.cleanup = cleanup;

@@ -35,0 +52,0 @@ exports.__defineGetter__('Module', function () { return Module; });

{
"name": "edx-modulestore",
"version": "2.6.0",
"version": "2.7.0",
"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