diff --git a/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py b/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py index 22e65b2347..a5eb2ed64c 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py @@ -22,7 +22,7 @@ from .xml_module import XmlDescriptor from xmodule.modulestore import Location import self_assessment_module import open_ended_module -from combined_open_ended_rubric import CombinedOpenEndedRubric, RubricParsingError, GRADER_TYPE_IMAGE_DICT, HUMAN_GRADER_TYPE +from combined_open_ended_rubric import CombinedOpenEndedRubric, RubricParsingError, GRADER_TYPE_IMAGE_DICT, HUMAN_GRADER_TYPE, LEGEND_LIST from .stringify import stringify_children import dateutil import dateutil.parser @@ -673,7 +673,7 @@ class CombinedOpenEndedV1Module(): task_data.update({'task_number': i + 1}) status.append(task_data) - context = {'status_list': status, 'grader_type_image_dict' : GRADER_TYPE_IMAGE_DICT} + context = {'status_list': status, 'grader_type_image_dict' : GRADER_TYPE_IMAGE_DICT, 'legend_list' : LEGEND_LIST} status_html = self.system.render_template("combined_open_ended_status.html", context) return status_html diff --git a/common/lib/xmodule/xmodule/combined_open_ended_rubric.py b/common/lib/xmodule/xmodule/combined_open_ended_rubric.py index a0f42a14cf..162a188c72 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_rubric.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_rubric.py @@ -19,6 +19,10 @@ HUMAN_GRADER_TYPE = { 'BC' : 'AI-Assessment', } +DO_NOT_DISPLAY = ['BC', 'IN'] + +LEGEND_LIST = [{'name' : HUMAN_GRADER_TYPE[k], 'image' : GRADER_TYPE_IMAGE_DICT[k]} for k in GRADER_TYPE_IMAGE_DICT.keys() if k not in DO_NOT_DISPLAY ] + class RubricParsingError(Exception): def __init__(self, msg): self.msg = msg diff --git a/lms/templates/combined_open_ended.html b/lms/templates/combined_open_ended.html index e219814744..db5edc2159 100644 --- a/lms/templates/combined_open_ended.html +++ b/lms/templates/combined_open_ended.html @@ -17,7 +17,6 @@ -
diff --git a/lms/templates/combined_open_ended_status.html b/lms/templates/combined_open_ended_status.html index 116bca87a4..d41d2dc718 100644 --- a/lms/templates/combined_open_ended_status.html +++ b/lms/templates/combined_open_ended_status.html @@ -1,20 +1,30 @@
-
- %for i in xrange(0,len(status_list)): - <%status=status_list[i]%> - %if i==len(status_list)-1: -
- %else: -
- %endif - %if status['grader_type'] in grader_type_image_dict: - <% grader_image = grader_type_image_dict[status['grader_type']]%> - - %else: - ${status['human_task']} - %endif - (${status['human_state']}) ${status['score']} / ${status['max_score']} -
- %endfor -
+
+ % for i in xrange(0,len(legend_list)): + <%legend_title=legend_list[i]['name'] %> + <%legend_image=legend_list[i]['image'] %> + +
+ ${legend_title}= +
+ % endfor +
+
+ %for i in xrange(0,len(status_list)): + <%status=status_list[i]%> + %if i==len(status_list)-1: +
+ %else: +
+ %endif + %if status['grader_type'] in grader_type_image_dict: + <% grader_image = grader_type_image_dict[status['grader_type']]%> + + %else: + ${status['human_task']} + %endif + (${status['human_state']}) ${status['score']} / ${status['max_score']} +
+ %endfor +