We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents daff8af + 3b42928 commit 9cefdf9Copy full SHA for 9cefdf9
lib/AnswerHash.pm
@@ -252,7 +252,7 @@ sub input { #$rh_ans->input('foo') is a synonym for $rh_ans->{student_ans}='f
252
sub score {
253
my $self = shift;
254
my $score = shift;
255
- $self->{score} = $score if defined($score);
+ $self->{score} = $score || 0 if defined($score);
256
$self->{score};
257
}
258
lib/Value/AnswerChecker.pm
@@ -1696,7 +1696,7 @@ sub cmp_list_compare {
1696
#
1697
# Check for empty lists
1698
1699
- if (scalar(@correct) == 0) { $ans->score($m == 0); return }
+ if (scalar(@correct) == 0) { $ans->score($m == 0 ? 1 : 0); return }
1700
1701
1702
# Loop through student answers looking for correct ones
0 commit comments