Proper partial credit checks
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -697,7 +697,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
|
||||
else:
|
||||
post_assessment = ""
|
||||
correct = ""
|
||||
previous_answer = self.initial_display
|
||||
previous_answer = ""
|
||||
|
||||
context = {
|
||||
'prompt': self.child_prompt,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user