diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index 063c69e950..b7f8aba1ba 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -202,7 +202,7 @@ def edit_subsection(request, location): if item.location.category != 'sequential': return HttpResponseBadRequest() - parent_locs = modulestore().get_parent_locations(location) + parent_locs = modulestore().get_parent_locations(location, None) # we're for now assuming a single parent if len(parent_locs) != 1: @@ -285,10 +285,10 @@ def edit_unit(request, location): # this will need to change to check permissions correctly so as # to pick the correct parent subsection - containing_subsection_locs = modulestore().get_parent_locations(location) + containing_subsection_locs = modulestore().get_parent_locations(location, None) containing_subsection = modulestore().get_item(containing_subsection_locs[0]) - containing_section_locs = modulestore().get_parent_locations(containing_subsection.location) + containing_section_locs = modulestore().get_parent_locations(containing_subsection.location, None) containing_section = modulestore().get_item(containing_section_locs[0]) # cdodge hack. We're having trouble previewing drafts via jump_to redirect diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index 259e193315..8b4db799cb 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -6,7 +6,6 @@ import requests import time from datetime import datetime -from xmodule.graders import load_grading_policy from xmodule.modulestore import Location from xmodule.seq_module import SequenceDescriptor, SequenceModule from xmodule.timeparse import parse_time, stringify_time diff --git a/common/lib/xmodule/xmodule/modulestore/draft.py b/common/lib/xmodule/xmodule/modulestore/draft.py index 5ad663cec2..4b0b5c8abf 100644 --- a/common/lib/xmodule/xmodule/modulestore/draft.py +++ b/common/lib/xmodule/xmodule/modulestore/draft.py @@ -160,13 +160,13 @@ class DraftModuleStore(ModuleStoreBase): return super(DraftModuleStore, self).delete_item(as_draft(location)) - def get_parent_locations(self, location): + def get_parent_locations(self, location, course_id): '''Find all locations that are the parents of this location. Needed for path_to_location(). returns an iterable of things that can be passed to Location. ''' - return super(DraftModuleStore, self).get_parent_locations(location) + return super(DraftModuleStore, self).get_parent_locations(location, course_id) def publish(self, location, published_by_id): """