Enable linking into the middle of sequences
* add a url that has an extra /{position} at the end
* pass it through to get_module
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user