Fix errors around error descriptors and custom tag modules

This commit is contained in:
Calen Pennington
2012-12-18 09:54:25 -05:00
parent 8693d288c8
commit d61c91c139
4 changed files with 17 additions and 19 deletions

View File

@@ -22,6 +22,10 @@ log = logging.getLogger(__name__)
class ErrorModule(XModule):
contents = String(scope=Scope.content)
error_msg = String(scope=Scope.content)
def get_html(self):
'''Show an error to staff.
TODO (vshnayder): proper style, divs, etc.
@@ -29,8 +33,8 @@ class ErrorModule(XModule):
# staff get to see all the details
return self.system.render_template('module-error.html', {
'staff_access': True,
'data': self.definition['data']['contents'],
'error': self.definition['data']['error_msg'],
'data': self.contents,
'error': self.error_msg,
})