Skip to content

Commit

Permalink
bring back scalar context output for grade_all_sets
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Jordan committed Nov 26, 2024
1 parent ac5953b commit a717243
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/WeBWorK/Utils/Sets.pm
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ sub grade_all_sets (
push @$includedSets, $userSet;
}

return ($courseTotalRight, $courseTotal, $includedSets);
return
wantarray
? ($courseTotalRight, $courseTotal, $includedSets)
: ($courseTotal ? $courseTotalRight / $courseTotal : 0);

}

sub is_restricted ($db, $set, $studentName) {
Expand Down

0 comments on commit a717243

Please sign in to comment.