diff --git a/lib/WeBWorK/Authen/LTIAdvanced/SubmitGrade.pm b/lib/WeBWorK/Authen/LTIAdvanced/SubmitGrade.pm index ce89b77c4a..70cfb33bc5 100644 --- a/lib/WeBWorK/Authen/LTIAdvanced/SubmitGrade.pm +++ b/lib/WeBWorK/Authen/LTIAdvanced/SubmitGrade.pm @@ -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) { diff --git a/lib/WeBWorK/Authen/LTIAdvantage/SubmitGrade.pm b/lib/WeBWorK/Authen/LTIAdvantage/SubmitGrade.pm index 6509f40b24..a927e1cd0d 100644 --- a/lib/WeBWorK/Authen/LTIAdvantage/SubmitGrade.pm +++ b/lib/WeBWorK/Authen/LTIAdvantage/SubmitGrade.pm @@ -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) {