Commit f5fcd3e1 by Vik Paruchuri

Make grader image dict a constant

parent 49733633
......@@ -3,6 +3,11 @@ from lxml import etree
log = logging.getLogger(__name__)
GRADER_TYPE_IMAGE_DICT = {
'SA' : '/static/images/self_assessment_icon.png',
'PE' : '/static/images/peer_grading_icon.png',
'ML' : '/static/images/ml_grading_icon.png',
}
class RubricParsingError(Exception):
def __init__(self, msg):
......@@ -171,18 +176,13 @@ class CombinedOpenEndedRubric(object):
rubric_categories[i]['options'][j]['grader_types'].append(grader_type)
log.debug(rubric_categories)
grader_type_image_dict = {
'SA' : '/static/images/self_assessment_icon.png',
'PE' : '/static/images/peer_grading_icon.png',
'ML' : '/static/images/ml_grading_icon.png',
}
html = self.system.render_template('open_ended_rubric.html',
{'categories': rubric_categories,
'has_score': True,
'view_only': True,
'max_score': max_score,
'combined_rubric' : True,
'grader_type_image_dict' : grader_type_image_dict,
'grader_type_image_dict' : GRADER_TYPE_IMAGE_DICT,
})
return html
......
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