Commit 5931a8d9 by chrisndodge

Merge pull request #903 from MITx/fix/cdodge/broken-path-to-view-subsection

when calling jump_to when location=<id-of-sequential> then Position is b...
parents f4b61e8f a47b2be8
...@@ -325,6 +325,12 @@ def jump_to(request, course_id, location): ...@@ -325,6 +325,12 @@ def jump_to(request, course_id, location):
except NoPathToItem: except NoPathToItem:
raise Http404("This location is not in any class: {0}".format(location)) raise Http404("This location is not in any class: {0}".format(location))
# cdodge: the CAS is generating a link to the LMS for 'subsections' (aka sequentials)
# and there is no associated 'Position' for this. The above Path_to_location is returning None for Position
# however, this ends up producing a 404 on the redirect
if position is None:
position = 0
# Rely on index to do all error handling and access control. # Rely on index to do all error handling and access control.
return redirect('courseware_position', return redirect('courseware_position',
course_id=course_id, course_id=course_id,
......
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