Skip to content

Commit de766d2

Browse files
committed
record/update user lis_source_did even when grade passback not in use
1 parent f58e997 commit de766d2

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

lib/WeBWorK/Authen/LTIAdvanced.pm

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -487,15 +487,10 @@ sub authenticate {
487487
$self->{initial_login} = 1;
488488
}
489489

490-
# If we are using grade passback then make sure the data
491-
# we need to submit the grade is kept up to date.
492-
my $LTIGradeMode = $ce->{LTIGradeMode} // '';
493-
if ($LTIGradeMode eq 'course'
494-
|| $LTIGradeMode eq 'homework')
495-
{
496-
my $submitGrade = WeBWorK::Authen::LTIAdvanced::SubmitGrade->new($c);
497-
$submitGrade->update_sourcedid($userID);
498-
}
490+
# In case we will use grade passback at some point,
491+
# make sure the data we need to submit the grade is kept up to date.
492+
my $submitGrade = WeBWorK::Authen::LTIAdvanced::SubmitGrade->new($c);
493+
$submitGrade->update_sourcedid($userID);
499494

500495
return 1;
501496
}

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
}

0 commit comments

Comments
 (0)