Fix context course on edit subsection

This commit is contained in:
Calen Pennington
2012-10-12 13:19:14 -04:00
parent 0e277277a8
commit 90a847cb26

View File

@@ -181,6 +181,12 @@ def edit_subsection(request, location):
item = modulestore().get_item(location)
# TODO: we need a smarter way to figure out what course an item is in
for course in modulestore().get_courses():
if (course.location.org == item.location.org and
course.location.course == item.location.course):
break
lms_link = get_lms_link_for_item(location)
# make sure that location references a 'sequential', otherwise return BadRequest