diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index 82ec3cadeb..ee29491d27 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -195,7 +195,6 @@ def _get_module(user, request, location, student_module_cache, course_id, positi descriptor.category, shared_state_key) - instance_state = instance_module.state if instance_module is not None else None shared_state = shared_module.state if shared_module is not None else None @@ -254,7 +253,7 @@ def _get_module(user, request, location, student_module_cache, course_id, positi # by the replace_static_urls code below replace_urls=replace_urls, node_path=settings.NODE_PATH, - anonymous_student_id=anonymous_student_id + anonymous_student_id=anonymous_student_id, ) # pass position specified in URL to module through ModuleSystem system.set('position', position) diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index 92f6716320..5e75e99a4f 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -5,8 +5,6 @@ import itertools from functools import partial -from functools import partial - from django.conf import settings from django.core.context_processors import csrf from django.core.urlresolvers import reverse @@ -152,7 +150,7 @@ def index(request, course_id, chapter=None, section=None, course_id, request.user, section_descriptor) module = get_module(request.user, request, section_descriptor.location, - student_module_cache, course_id) + student_module_cache, course_id, position) if module is None: # User is probably being clever and trying to access something # they don't have access to. diff --git a/lms/urls.py b/lms/urls.py index 86d654eb40..f19f4682f9 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -142,6 +142,8 @@ if settings.COURSEWARE_ENABLED: 'courseware.views.index', name="courseware_chapter"), url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/courseware/(?P[^/]*)/(?P
[^/]*)/$', 'courseware.views.index', name="courseware_section"), + url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/courseware/(?P[^/]*)/(?P
[^/]*)/(?P[^/]*)/?$', + 'courseware.views.index', name="courseware_position"), url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/progress$', 'courseware.views.progress', name="progress"), # Takes optional student_id for instructor use--shows profile as that student sees it. @@ -164,7 +166,7 @@ if settings.COURSEWARE_ENABLED: if settings.MITX_FEATURES.get('ENABLE_DISCUSSION_SERVICE'): urlpatterns += ( - url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/news$', + url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/news$', 'courseware.views.news', name="news"), url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/discussion/', include('django_comment_client.urls'))