Commit 285beb38 by cahrens

Clean up from rebase with master.

parent d447c075
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 () {
......
......@@ -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):
"""
......
......@@ -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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment