retrieve inline discussion by ajax
This commit is contained in:
@@ -124,13 +124,6 @@ def get_module(user, request, location, student_module_cache, position=None):
|
||||
'''
|
||||
descriptor = modulestore().get_item(location)
|
||||
|
||||
user_id = user.id
|
||||
|
||||
import re
|
||||
course_id = re.search(r'^/courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/', request.path)
|
||||
if course_id:
|
||||
course_id = course_id.group('course_id')
|
||||
|
||||
instance_module = student_module_cache.lookup(descriptor.category,
|
||||
descriptor.location.url())
|
||||
|
||||
@@ -142,11 +135,6 @@ def get_module(user, request, location, student_module_cache, position=None):
|
||||
shared_module = None
|
||||
|
||||
instance_state = instance_module.state if instance_module is not None else {}
|
||||
|
||||
instance_hash = json.loads(instance_state) if isinstance(instance_state, str) or isinstance(instance_state, unicode) \
|
||||
else instance_state
|
||||
|
||||
instance_state = json.dumps(dict(instance_hash.items() + [("user_id", user.id), ("course_id", course_id)]))
|
||||
shared_state = shared_module.state if shared_module is not None else None
|
||||
|
||||
# TODO (vshnayder): fix hardcoded urls (use reverse)
|
||||
|
||||
Reference in New Issue
Block a user