-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into issue/1116
* develop: (94 commits) update archive dependecy Fixes: #1928 Fix and refactor helper update Check if user is course owner Require modules before plugins Change to ensureDirSync refactor to set scrollTop after all animations are completed hook into transition end event instead of post render Fixes #1906 Allow MongoDB authentication in install script Fix modules define Fix globalData Make sure we load the plugin Fix issue with merge Save isVisible and isHidden on blocks and components Fix context menu for page Move plugin folder to modules Refactor for readability Update comments ... # Conflicts: # plugins/output/adapt/index.js
- Loading branch information
Showing
72 changed files
with
2,653 additions
and
2,722 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// LICENCE https://github.com/adaptlearning/adapt_authoring/blob/master/LICENSE | ||
define(function(require) { | ||
var Backbone = require('backbone'); | ||
var Origin = require('core/origin'); | ||
var Helpers = require('core/helpers'); | ||
|
||
var ContentCollection = Backbone.Collection.extend({ | ||
initialize : function(models, options) { | ||
this._type = options._type; | ||
this.model = Helpers.contentModelMap(this._type); | ||
this._courseId = options._courseId; | ||
this._parentId = options._parentId; | ||
this.url = options.url || 'api/content/' + options._type + this.buildQuery(); | ||
|
||
this.on('reset', this.loadedData, this); | ||
}, | ||
|
||
buildQuery: function() { | ||
var query = ''; | ||
if(this._courseId) { | ||
query += '_courseId=' + this._courseId | ||
} | ||
if(this._parentId) { | ||
query += '_parentId=' + this._parentId | ||
} | ||
return query ? '?' + query : ''; | ||
}, | ||
|
||
loadedData: function() { | ||
Origin.trigger('contentCollection:dataLoaded', this._type); | ||
} | ||
}); | ||
|
||
return ContentCollection; | ||
}); |
Oops, something went wrong.