Skip to content

Commit

Permalink
when all gaps have 0 marks, each gap adds 1/len(gaps) credit
Browse files Browse the repository at this point in the history
see #755

I had a gapfill with two gaps, each with 0 marks available. The
following should be true:

* answering both gaps incorrectly gets 0 credit
* answering both gaps correctly gets 1 credit
* answering one gap correctly and one incorrectly gets partial credit

Previously, the built-in gapfill marking algorithm was awarding 1 credit
for each gap if the total available is 0. This commit changes it to
1/len(gaps), satisfying the conditions above.
  • Loading branch information
christianp committed Oct 27, 2020
1 parent d1f7280 commit f5b6f5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion marking_scripts/gapfill.jme
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ gap_feedback (Feedback on each of the gaps):
assert(noFeedbackIcon,
assert(name="" or len(gaps)=1,feedback(translate('part.gapfill.feedback header',["name": name])))
);
concat_feedback(filter(x["op"]<>"warning",x,result["feedback"]), if(marks>0,result["marks"]/marks,1), noFeedbackIcon);
concat_feedback(filter(x["op"]<>"warning",x,result["feedback"]), if(marks>0,result["marks"]/marks,1/len(gaps)), noFeedbackIcon);
result
),
err,
Expand Down

0 comments on commit f5b6f5d

Please sign in to comment.