Skip to content

Commit 7c33a93

Browse files
authored
Merge pull request #2764 from Alex-Jordan/lis-source-did
record/update user lis_source_did even when grade passback not in use
2 parents f576c3d + 87fa549 commit 7c33a93

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/WeBWorK/Authen/LTIAdvantage.pm

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,9 @@ sub authenticate ($self) {
326326
$self->{initial_login} = 1;
327327
}
328328

329-
# If we are using grade passback then make sure the data we need to submit the grade is kept up to date.
330-
my $LTIGradeMode = $ce->{LTIGradeMode} // '';
331-
if ($LTIGradeMode eq 'course' || $LTIGradeMode eq 'homework') {
332-
WeBWorK::Authen::LTIAdvantage::SubmitGrade->new($c)->update_passback_data($self->{user_id});
333-
}
329+
# In case we will use grade passback at some point,
330+
# make sure the data we need to submit the grade is kept up to date.
331+
WeBWorK::Authen::LTIAdvantage::SubmitGrade->new($c)->update_passback_data($self->{user_id});
334332

335333
return 1;
336334
}

lib/WeBWorK/Authen/LTIAdvantage/SubmitGrade.pm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ sub update_passback_data ($self, $userID) {
7070
$self->warning('Missing LMS user id (sub) in JWT.');
7171
}
7272

73+
return unless $ce->{LTIGradeMode};
74+
7375
# The lti_lms_lineitem is the url to post grades to. It was the 'lineitem' key of the
7476
# 'https://purl.imsglobal.org/spec/lti-ags/claim/endpoint' object in the JWT received from the LMS.
7577
if ($ce->{LTIGradeMode} eq 'course') {

0 commit comments

Comments
 (0)