Commit b30407d7 by Vik Paruchuri

Work on showing results properly

parent de8e1e94
...@@ -306,6 +306,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild): ...@@ -306,6 +306,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
'grammar': 1, 'grammar': 1,
# needs to be after all the other feedback # needs to be after all the other feedback
'markup_text': 3} 'markup_text': 3}
do_not_render = ['topicality', 'prompt-overlap']
default_priority = 2 default_priority = 2
...@@ -360,6 +361,10 @@ class OpenEndedModule(openendedchild.OpenEndedChild): ...@@ -360,6 +361,10 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
if len(feedback) == 0: if len(feedback) == 0:
return format_feedback('errors', 'No feedback available') return format_feedback('errors', 'No feedback available')
for tag in do_not_render:
if tag in feedback:
feedback.pop(tag)
feedback_lst = sorted(feedback.items(), key=get_priority) feedback_lst = sorted(feedback.items(), key=get_priority)
feedback_list_part1 = u"\n".join(format_feedback(k, v) for k, v in feedback_lst) feedback_list_part1 = u"\n".join(format_feedback(k, v) for k, v in feedback_lst)
else: else:
......
<section> <section>
<header>Feedback</header> <header></header>
<div class="shortform-custom" data-open-text='Show detailed results' data-close-text='Hide detailed results'> <div class="shortform-custom" data-open-text='Show detailed results' data-close-text='Hide detailed results'>
<div class="result-output"> <div class="result-output">
<p>Score: ${score}</p> <p>Score: ${score}</p>
% if grader_type == "ML": ${rubric_feedback | n}
<p>Check below for full feedback:</p>
% endif
</div> </div>
</div> </div>
<div class="longform"> <div class="longform">
<div class="result-output"> <div class="result-output">
${ feedback | n} ${ feedback | n}
</div> </div>
${rubric_feedback | n}
</div> </div>
</section> </section>
<form class="rubric-template" id="inputtype_${id}" xmlns="http://www.w3.org/1999/html"> <form class="rubric-template" id="inputtype_${id}" xmlns="http://www.w3.org/1999/html">
<h3>Rubric</h3>
% if view_only and has_score: % if view_only and has_score:
<p>This is the rubric that was used to grade your submission. The highlighted selection matches how the grader feels you performed in each category.</p> <p></p>
% elif view_only: % elif view_only:
<p>Use the below rubric to rate this submission.</p> <p>Use the below rubric to rate this submission.</p>
% else: % else:
<p>Select the criteria you feel best represents this submission in each category.</p> <h3>Rubric</h3>
<p>Select the criteria you feel best represents this submission in each category.</p>
% endif % endif
<div class="rubric"> <div class="rubric">
% for i in range(len(categories)): % for i in range(len(categories)):
...@@ -14,23 +14,25 @@ ...@@ -14,23 +14,25 @@
<ul class="rubric-list"> <ul class="rubric-list">
% 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']:
<li class="selected-grade"> <li class="selected-grade">
%else: %else:
<li> <li>
% endif % endif
% if view_only: % if view_only:
## if this is the selected rubric block, show it highlighted % if option['selected']:
<div class="rubric-label"> ## if this is the selected rubric block, show it highlighted
${option['points']} points : ${option['text']} <div class="rubric-label">
</div> ${option['points']} points : ${option['text']}
</div>
% endif
% else: % else:
<label class="rubric-label" for="score-${i}-${j}"> <label class="rubric-label" for="score-${i}-${j}">
<input type="radio" class="score-selection" name="score-selection-${i}" id="score-${i}-${j}" value="${option['points']}"/> <input type="radio" class="score-selection" name="score-selection-${i}" id="score-${i}-${j}" value="${option['points']}"/>
<span class="wrappable"> ${option['points']} points : ${option['text']}</span> <span class="wrappable"> ${option['points']} points : ${option['text']}</span>
</label> </label>
% endif % endif
</li> </li>
% endfor % endfor
</ul> </ul>
% 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