diff --git a/djangoapps/courseware/management/commands/check_course.py b/djangoapps/courseware/management/commands/check_course.py index 2f069ee5f3..17a97268cf 100644 --- a/djangoapps/courseware/management/commands/check_course.py +++ b/djangoapps/courseware/management/commands/check_course.py @@ -33,7 +33,7 @@ class Command(BaseCommand): ajax_url='', state=None, track_function = lambda x,y,z:None, - render_function = lambda x: {'content':'','destroy_js':'','init_js':'','type':'video'}) + render_function = lambda x: {'content':'','type':'video'}) except: print "==============> Error in ", etree.tostring(module) check = False diff --git a/djangoapps/courseware/module_render.py b/djangoapps/courseware/module_render.py index 278d19fd2c..510d26033c 100644 --- a/djangoapps/courseware/module_render.py +++ b/djangoapps/courseware/module_render.py @@ -1,3 +1,4 @@ +import json import logging from lxml import etree @@ -130,8 +131,6 @@ def render_x_module(user, request, xml_module, module_object_preload): # Grab content content = instance.get_html() - init_js = instance.get_init_js() - destory_js = instance.get_destroy_js() # special extra information about each problem, only for users who are staff if user.is_staff: @@ -139,14 +138,10 @@ def render_x_module(user, request, xml_module, module_object_preload): render_histogram = len(histogram) > 0 content=content+render_to_string("staff_problem_info.html", {'xml':etree.tostring(xml_module), 'module_id' : module_id, + 'histogram': json.dumps(histogram), 'render_histogram' : render_histogram}) - if render_histogram: - init_js = init_js+render_to_string("staff_problem_histogram.js", {'histogram' : histogram, - 'module_id' : module_id}) - - content = {'content':content, - "destroy_js":destory_js, - 'init_js':init_js, + + content = {'content':content, 'type':module_type} return content diff --git a/djangoapps/courseware/modules/capa_module.py b/djangoapps/courseware/modules/capa_module.py index 7d42cfb250..b54b028c11 100644 --- a/djangoapps/courseware/modules/capa_module.py +++ b/djangoapps/courseware/modules/capa_module.py @@ -61,12 +61,6 @@ class Module(XModule): 'ajax_url':self.ajax_url, }) - def get_init_js(self): - return render_to_string('problem.js', - {'id':self.item_id, - 'ajax_url':self.ajax_url, - }) - def get_problem_html(self, encapsulate=True): html = self.lcp.get_html() content={'name':self.name, @@ -130,8 +124,8 @@ class Module(XModule): html=render_to_string('problem.html', context) if encapsulate: - html = '
Problem Content
+ +1.0x
+ + +').html(item.title) + list_item = $('