Proper partial credit checks

This commit is contained in:
Vik Paruchuri
2013-08-08 17:19:06 -04:00
parent f59045c3f9
commit d44b2e62a0
4 changed files with 18 additions and 2 deletions

View File

@@ -282,6 +282,13 @@ div.combined-rubric-container {
}
}
label.choicegroup_partialcorrect {
&:before {
margin-right: 15px;
content: url('../images/partially-correct-icon.png');
}
}
label.choicegroup_incorrect {
&:before {
margin-right: 15px;

View File

@@ -224,7 +224,14 @@ class CombinedOpenEndedRubric(object):
actual_scores[i] += [j]
actual_scores = [sum(i)/len(i) for i in actual_scores]
correct = [int(a>.66) for a in actual_scores]
correct = []
for (i,a) in enumerate(actual_scores):
if int(a)/max_scores[i]==1:
correct.append(1)
elif int(a)==0:
correct.append(0)
else:
correct.append(.5)
html = self.system.render_template('{0}/open_ended_combined_rubric.html'.format(self.TEMPLATE_DIR),
{'categories': rubric_categories,

View File

@@ -697,7 +697,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
else:
post_assessment = ""
correct = ""
previous_answer = self.initial_display
previous_answer = ""
context = {
'prompt': self.child_prompt,

View File

@@ -14,6 +14,8 @@
%if len(category['options'][j]['grader_types'])>0:
%if correct[i]==1:
<label class="choicegroup_correct wrapper-score-selection"></label>
%elif correct[i]==.5:
<label class="choicegroup_partialcorrect wrapper-score-selection"></label>
%else:
<label class="choicegroup_incorrect wrapper-score-selection"></label>
%endif