Commit e093a365 by Calen Pennington

Merge pull request #503 from MITx/feature/ichuang/fix-staff-debug

staff debug view currently presents an empty window - this fixes
parents 5b7ae1a9 7c242939
......@@ -112,11 +112,14 @@ def add_histogram(get_html, module, user):
edit_link = "%s/%s/tree/master/%s" % (giturl,data_dir,filepath)
else:
edit_link = False
source_file = module.metadata.get('source_file','') # source used to generate the problem XML, eg latex or word
staff_context = {'definition': module.definition.get('data'),
'metadata': json.dumps(module.metadata, indent=4),
'location': module.location,
'xqa_key': module.metadata.get('xqa_key',''),
'source_file' : source_file,
'source_url': '%s/%s/tree/master/%s' % (giturl,data_dir,source_file),
'category': str(module.__class__.__name__),
'element_id': module.location.html_id().replace('-','_'),
'edit_link': edit_link,
......
......@@ -31,9 +31,12 @@ ${module_content}
<header>
<h2>Staff Debug</h2>
</header>
<div class="staff_info">
<div class="staff_info" style="display:block">
location = ${location | h}
github = <a href="${edit_link}">${edit_link | h}</a>
%if source_file:
source_url = <a href="${source_url}">${source_file | h}</a>
%endif
definition = <pre>${definition | h}</pre>
metadata = ${metadata | h}
category = ${category | h}
......
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