Small bug fix causing crash when generating problem histogram.

This commit is contained in:
Bridger Maxwell
2012-06-01 17:34:04 -04:00
parent 0ad31f556f
commit e24df47b0b

View File

@@ -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
if user.is_staff:
module_id = xml_module.get('id')
histogram = grade_histogram(module_id)
render_histogram = len(histogram) > 0
content=content+render_to_string("staff_problem_info.html", {'xml':etree.tostring(xml_module),