Skip to content

Commit

Permalink
fix logic for homework_always with LTIGradeOnSubmit
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Jordan committed Nov 12, 2024
1 parent ce18354 commit 9c7aece
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/WeBWorK/Authen/LTIAdvanced/SubmitGrade.pm
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ async sub submit_set_grade ($self, $userID, $setID) {
my $ce = $c->{ce};
my $db = $c->{db};

return unless can_submit_LMS_score($db, $ce, $userID, $setID);
return
unless (can_submit_LMS_score($db, $ce, $userID, $setID)
|| !$self->{post_processing_mode} && $ce->{LTIGradeOnSubmit} eq 'homework_always');

my $user = $db->getUser($userID);
return 0 unless $user;
Expand Down
4 changes: 3 additions & 1 deletion lib/WeBWorK/Authen/LTIAdvantage/SubmitGrade.pm
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ async sub submit_set_grade ($self, $userID, $setID) {
my $ce = $c->{ce};
my $db = $c->{db};

return unless can_submit_LMS_score($db, $ce, $userID, $setID);
return
unless (can_submit_LMS_score($db, $ce, $userID, $setID)
|| !$self->{post_processing_mode} && $ce->{LTIGradeOnSubmit} eq 'homework_always');

my $user = $db->getUser($userID);
return 0 unless $user;
Expand Down

0 comments on commit 9c7aece

Please sign in to comment.