From 856156a14138aa06aa497316891997cb2e376565 Mon Sep 17 00:00:00 2001 From: Rocky Duan Date: Tue, 24 Jul 2012 16:49:27 -0400 Subject: [PATCH] provide user_id for xmodules --- lms/djangoapps/courseware/module_render.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index 00ffb8608b..4582627813 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -208,6 +208,7 @@ 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 None + instance_state = json.dumps(dict(json.loads(instance_state).items() + [("user_id", user.id)])) shared_state = shared_module.state if shared_module is not None else None # Setup system context for module instance