diff --git a/cms/static/js/views/pages/group_configurations.js b/cms/static/js/views/pages/group_configurations.js index e609fe8896..7965f305ec 100644 --- a/cms/static/js/views/pages/group_configurations.js +++ b/cms/static/js/views/pages/group_configurations.js @@ -1,27 +1,27 @@ define([ - 'jquery', 'underscore', 'gettext', 'js/views/baseview', + 'jquery', 'underscore', 'gettext', 'js/views/pages/base_page', 'js/views/group_configurations_list' ], -function ($, _, gettext, BaseView, GroupConfigurationsList) { +function ($, _, gettext, BasePage, GroupConfigurationsList) { 'use strict'; - var GroupConfigurationsPage = BaseView.extend({ + var GroupConfigurationsPage = BasePage.extend({ initialize: function() { - BaseView.prototype.initialize.call(this); + BasePage.prototype.initialize.call(this); this.listView = new GroupConfigurationsList({ collection: this.collection }); }, - render: function() { + renderPage: function() { var hash = this.getLocationHash(); - this.hideLoadingIndicator(); - this.$('.content-primary').append(this.listView.render().el); + this.$el.append(this.listView.render().el); this.addButtonActions(); - this.addWindowActions(); + this.addWindowActions(); if (hash) { // Strip leading '#' to get id string to match - this.expandConfiguration(hash.replace('#', '')) + this.expandConfiguration(hash.replace('#', '')); } + return $.Deferred().resolve().promise(); }, addButtonActions: function () { diff --git a/common/lib/xmodule/xmodule/modulestore/mongo/base.py b/common/lib/xmodule/xmodule/modulestore/mongo/base.py index 6ca71dcd31..ac6e7d4740 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongo/base.py +++ b/common/lib/xmodule/xmodule/modulestore/mongo/base.py @@ -1011,7 +1011,8 @@ class MongoModuleStore(ModuleStoreDraftAndPublished, ModuleStoreWriteBase): xblock = self.create_xmodule(location, **kwargs) xblock = self.update_item(xblock, user_id, allow_not_found=True) - return xblock + # Retrieve the item from the store so that it has edit info attributes + return self.get_item(xblock.location) def create_child(self, user_id, parent_usage_key, block_type, block_id=None, **kwargs): """ diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py index 36ed33a2c5..0d6efd0c5c 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py @@ -539,7 +539,7 @@ class TestMixedModuleStore(unittest.TestCase): """ self.initdb(default_ms) item = self.store.create_item( - self.course_locations[self.MONGO_COURSEID], 'problem', self.user_id, block_id='orphan' + self.user_id, self.course_locations[self.MONGO_COURSEID].course_key, 'problem', block_id='orphan' ) self.assertTrue(self.store.has_changes(item.location)) self.store.publish(item.location, self.user_id) @@ -618,10 +618,13 @@ class TestMixedModuleStore(unittest.TestCase): self.assertEqual(parent, self.course_locations[self.XML_COURSEID1]) def verify_get_parent_locations_results(self, expected_results): + def branch_agnostic(location): + return location if location is None else location.for_branch(None) + for child_location, parent_location, revision in expected_results: self.assertEqual( - parent_location, - self.store.get_parent_location(child_location, revision=revision) + branch_agnostic(parent_location), + branch_agnostic(self.store.get_parent_location(child_location, revision=revision)) ) @ddt.data('draft', 'split')