Commit 37621c26 by ichuang

Merge pull request #1884 from MITx/feature/cale/histogram-rendering

Only render a histogram for modules that have scores associated with the...
parents 9be7f8fc 4ba26a3a
......@@ -105,8 +105,12 @@ def add_histogram(get_html, module, user):
return get_html()
module_id = module.id
if module.descriptor.has_score:
histogram = grade_histogram(module_id)
render_histogram = len(histogram) > 0
else:
histogram = None
render_histogram = False
if settings.MITX_FEATURES.get('ENABLE_LMS_MIGRATION'):
[filepath, filename] = getattr(module.descriptor, 'xml_attributes', {}).get('filename', ['', None])
......
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