Make grader image dict a constant
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user