From 70d5ec6ea4fb8e434b19586a23110a0f743498fb Mon Sep 17 00:00:00 2001 From: cahrens Date: Wed, 14 Aug 2013 09:04:58 -0400 Subject: [PATCH] Make it clear that get_course_for_item is only a helper method in mongo modulestore. --- common/lib/xmodule/xmodule/modulestore/mongo/base.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/lib/xmodule/xmodule/modulestore/mongo/base.py b/common/lib/xmodule/xmodule/modulestore/mongo/base.py index 4fdbc4aef0..21daff1875 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongo/base.py +++ b/common/lib/xmodule/xmodule/modulestore/mongo/base.py @@ -681,7 +681,7 @@ class MongoModuleStore(ModuleStoreBase): # we should remove this once we can break this reference from the course to static tabs # TODO move this special casing to app tier (similar to attaching new element to parent) if location.category == 'static_tab': - course = self.get_course_for_item(location) + course = self._get_course_for_item(location) existing_tabs = course.tabs or [] existing_tabs.append({ 'type': 'static_tab', @@ -701,7 +701,7 @@ class MongoModuleStore(ModuleStoreBase): self.modulestore_update_signal.send(self, modulestore=self, course_id=course_id, location=location) - def get_course_for_item(self, location, depth=0): + def _get_course_for_item(self, location, depth=0): ''' VS[compat] cdodge: for a given Xmodule, return the course that it belongs to @@ -790,7 +790,7 @@ class MongoModuleStore(ModuleStoreBase): # we should remove this once we can break this reference from the course to static tabs loc = Location(location) if loc.category == 'static_tab': - course = self.get_course_for_item(loc) + course = self._get_course_for_item(loc) existing_tabs = course.tabs or [] for tab in existing_tabs: if tab.get('url_slug') == loc.name: @@ -818,7 +818,7 @@ class MongoModuleStore(ModuleStoreBase): # we should remove this once we can break this reference from the course to static tabs if location.category == 'static_tab': item = self.get_item(location) - course = self.get_course_for_item(item.location) + course = self._get_course_for_item(item.location) existing_tabs = course.tabs or [] course.tabs = [tab for tab in existing_tabs if tab.get('url_slug') != location.name] # Save the updates to the course to the MongoKeyValueStore