Commit e24df47b by Bridger Maxwell

Small bug fix causing crash when generating problem histogram.

parent 0ad31f55
...@@ -143,6 +143,7 @@ def render_x_module(user, request, xml_module, module_object_preload): ...@@ -143,6 +143,7 @@ def render_x_module(user, request, xml_module, module_object_preload):
# special extra information about each problem, only for users who are staff # special extra information about each problem, only for users who are staff
if user.is_staff: if user.is_staff:
module_id = xml_module.get('id')
histogram = grade_histogram(module_id) histogram = grade_histogram(module_id)
render_histogram = len(histogram) > 0 render_histogram = len(histogram) > 0
content=content+render_to_string("staff_problem_info.html", {'xml':etree.tostring(xml_module), content=content+render_to_string("staff_problem_info.html", {'xml':etree.tostring(xml_module),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment