Skip to content

Commit

Permalink
more log messages for submit_course_grade
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Jordan committed Nov 28, 2024
1 parent a717243 commit 5b31fb8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/WeBWorK/Authen/LTIAdvanced/SubmitGrade.pm
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ async sub submit_course_grade ($self, $userID, $submittedSet = undef) {
return 0;
}

return -1 if $submittedSet && !getSetPassbackScore($db, $ce, $userID, $submittedSet, 1);
if ($submittedSet && !getSetPassbackScore($db, $ce, $userID, $submittedSet, 1)) {
$self->warning('It is not after the $LTISendScoresAfterDate and the $LTISendGradesEarlyThreshold was not met. '
. 'Not updating grade.');
return -1;
}

my ($courseTotalRight, $courseTotal, $includedSets) = grade_all_sets($db, $ce, $userID, \&getSetPassbackScore);
if (@$includedSets) {
Expand Down
6 changes: 5 additions & 1 deletion lib/WeBWorK/Authen/LTIAdvantage/SubmitGrade.pm
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,11 @@ async sub submit_course_grade ($self, $userID, $submittedSet = undef) {
return 0;
}

return -1 if $submittedSet && !getSetPassbackScore($db, $ce, $userID, $submittedSet, 1);
if ($submittedSet && !getSetPassbackScore($db, $ce, $userID, $submittedSet, 1)) {
$self->warning('It is not after the $LTISendScoresAfterDate and the $LTISendGradesEarlyThreshold was not met. '
. 'Not updating grade.');
return -1;
}

my ($courseTotalRight, $courseTotal, $includedSets) = grade_all_sets($db, $ce, $userID, \&getSetPassbackScore);
if (@$includedSets) {
Expand Down

0 comments on commit 5b31fb8

Please sign in to comment.