Commit 85324ec8 by Vik Paruchuri

Restyle creates a combined results view

parent e566005b
...@@ -591,15 +591,22 @@ class CombinedOpenEndedV1Module(): ...@@ -591,15 +591,22 @@ class CombinedOpenEndedV1Module():
for ri in all_responses: for ri in all_responses:
for i in xrange(0,len(ri['rubric_scores'])): for i in xrange(0,len(ri['rubric_scores'])):
feedback = ri['feedback_dicts'][i].get('feedback','') feedback = ri['feedback_dicts'][i].get('feedback','')
rubric_data = self.rubric_renderer.render_rubric(stringify_children(self.static_data['rubric']), ri['rubric_scores'][i])
if rubric_data['success']:
rubric_html = rubric_data['html']
else:
rubric_html = ''
context = { context = {
'rubric_html': self.rubric_renderer.render_rubric(stringify_children(self.static_data['rubric']), ri['rubric_scores'][i]), 'rubric_html': rubric_html,
'grader_type': ri['grader_type'], 'grader_type': ri['grader_type'],
'grader_type_image_dict' : GRADER_TYPE_IMAGE_DICT,
'human_grader_types' : HUMAN_GRADER_TYPE,
'feedback' : feedback, 'feedback' : feedback,
} }
context_list.append(context) context_list.append(context)
feedback_table = self.system.render_template('open_ended_result_table.html', {'context_list' : context_list}) feedback_table = self.system.render_template('open_ended_result_table.html', {
'context_list' : context_list,
'grader_type_image_dict' : GRADER_TYPE_IMAGE_DICT,
'human_grader_types' : HUMAN_GRADER_TYPE,
})
context = { context = {
'results': feedback_table, 'results': feedback_table,
'task_name' : "Combined Results", 'task_name' : "Combined Results",
......
...@@ -119,6 +119,7 @@ div.combined-rubric-container { ...@@ -119,6 +119,7 @@ div.combined-rubric-container {
} }
} }
} }
margin-bottom: 5px;
} }
div.result-container { div.result-container {
...@@ -252,6 +253,11 @@ div.result-container { ...@@ -252,6 +253,11 @@ div.result-container {
} }
} }
} }
.rubric-result {
font-size: .9em;
padding: 2px;
display: inline-table;
}
} }
......
% for context in context_list: % for co in context_list:
% if context['grader_type'] in grader_type_image_dict: % if co['grader_type'] in grader_type_image_dict:
<%grader_type=co['grader_type']%>
<% grader_image = grader_type_image_dict[grader_type] %> <% grader_image = grader_type_image_dict[grader_type] %>
% if grader_type in human_grader_types: % if grader_type in human_grader_types:
<% human_title = human_grader_types[grader_type] %> <% human_title = human_grader_types[grader_type] %>
% else: % else:
<% human_title = grader_type %> <% human_title = grader_type %>
% endif % endif
<div class="rubric-result">
<img src="${grader_image}" title="${human_title}"/> <img src="${grader_image}" title="${human_title}"/>
% endif </div>
${rubric_html} <div class="rubric-result">
${feedback} ${co['rubric_html']}
</div>
<div class="rubric-result">
${co['feedback']}
</div>
<br/>
%endif %endif
%endfor %endfor
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
% for j in range(len(category['options'])): % for j in range(len(category['options'])):
<% option = category['options'][j] %> <% option = category['options'][j] %>
% if option['selected']: % if option['selected']:
${category['description']} : ${option['points']} points , ${category['description']} : ${option['points']} points |
% endif % endif
% endfor % endfor
% endfor % endfor
......
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