From a47b2be8dffef9190d9db9f68fec7dde5051af01 Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Sun, 14 Oct 2012 21:31:45 -0400 Subject: [PATCH] set position=0 when position=None. Discuss with Dave O. --- lms/djangoapps/courseware/views.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index e12c5bf93d..3dc2c4996a 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -325,10 +325,11 @@ def jump_to(request, course_id, location): except NoPathToItem: 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: - return redirect('courseware_section', course_id=course_id, - chapter=chapter, - section=section) + position = 0 # Rely on index to do all error handling and access control. return redirect('courseware_position',