Conflicts: cms/djangoapps/contentstore/tests/test_contentstore.py cms/djangoapps/contentstore/views/component.py cms/djangoapps/contentstore/views/item.py cms/djangoapps/contentstore/views/preview.py cms/djangoapps/contentstore/views/tests/test_container.py cms/static/js/spec/views/unit_spec.js cms/static/js/utils/module.js cms/templates/container.html cms/templates/studio_vertical_wrapper.html cms/templates/studio_xblock_wrapper.html common/djangoapps/student/views.py lms/templates/notes.html lms/templates/textannotation.html lms/templates/videoannotation.html
32 lines
699 B
JavaScript
32 lines
699 B
JavaScript
/**
|
|
* Utilities for modules/xblocks.
|
|
*
|
|
* Returns:
|
|
*
|
|
* urlRoot: the root for creating/updating an xblock.
|
|
* getUpdateUrl: a utility method that returns the xblock update URL, appending
|
|
* the location if passed in.
|
|
*/
|
|
define(["underscore"], function (_) {
|
|
var urlRoot = '/xblock';
|
|
|
|
var getUpdateUrl = function (locator) {
|
|
<<<<<<< HEAD
|
|
if (locator === undefined) {
|
|
return urlRoot + "/";
|
|
=======
|
|
if (_.isUndefined(locator)) {
|
|
return urlRoot;
|
|
>>>>>>> edx/master
|
|
}
|
|
else {
|
|
return urlRoot + "/" + locator;
|
|
}
|
|
};
|
|
return {
|
|
urlRoot: urlRoot,
|
|
getUpdateUrl: getUpdateUrl
|
|
};
|
|
});
|
|
|