diff --git a/djangoapps/courseware/module_render.py b/djangoapps/courseware/module_render.py index 38f9e0211b..d10d13637a 100644 --- a/djangoapps/courseware/module_render.py +++ b/djangoapps/courseware/module_render.py @@ -144,12 +144,17 @@ def render_x_module(user, request, xml_module, module_object_preload): module_object_preload.append(smod) # Grab content content = instance.get_html() + init_js = instance.get_init_js() + destory_js = instance.get_destroy_js() if user.is_staff: content=content+render_to_string("staff_problem_info.html", {'xml':etree.tostring(xml_module), - 'histogram':grade_histogram(module_id)}) + 'module_id' : module_id}) + init_js = init_js+render_to_string("staff_problem_histogram.js", {'histogram' : grade_histogram(module_id), + 'module_id' : module_id}) + content = {'content':content, - "destroy_js":instance.get_destroy_js(), - 'init_js':instance.get_init_js(), + "destroy_js":destory_js, + 'init_js':init_js, 'type':module_type} return content diff --git a/templates/courseware.html b/templates/courseware.html index ec4be8c6c4..d8972f0935 100644 --- a/templates/courseware.html +++ b/templates/courseware.html @@ -1,7 +1,12 @@ <%inherit file="main.html" /> <%block name="title">