Skip to content

Commit 400f812

Browse files
committed
Add LTI 1.3 features.
First, the `lineitems` URL that is sent with any resource link (and even for a deep linking request, i.e., a content selection request) is stored in the course settings whenever one of those occur. This `lineitems` URL is unique for the external tool, and can be used to fetch a list of all resource links that use the external tool. Then when any grade pass back is performed this URL is used to get that list which includes the `lineitem` URL for each specific resource link. That is the link that is used for grade pass back for the set. However, webwork needs to be able to identify the set it belongs to. Since it does not come from a resource link launch the webwork2 set id is not available. To fix this, when deep linking is used to create a resource link, webwork now sets the `resourceId` of the lineitem. Note that this is a reserved value for the tool provider, and the LMS (the tool consumer) is not supposed to ever change it, and must send it when the `lineitems` URL is used. Thus is deep linking is used to create a resource link to a set, then grade pass back will be available immediately for that set without a user ever using the link. Second, implement LMS roster synchronization. The requires that the names and roles service be enabled for the external tool. The registration URL now includes the `https://purl.imsglobal.org/spec/lti-nrps/scope/contextmembership.readonly` scope which makes this so. Note that tools created manually without the registration URL, this service can be enabled for the tool. However, at least for Canvas, if the tool was created using the registration URL before this scope was added, the only way to add the scope is to have the Canvas admin delete the tool and recreate it again using the registration URL with what is in this pull request. Moodle still allows editing of the tool created via the registration URL, so this can be added later. In any case, if the names and roles service is enabled, than any launch request (again including a deep linking request) includes the `namesrolesservice` URL. That can be used to request the list of users in the LMS course. There is now a new tab that will appear in the accounts manager if LTI 1.3 is enabled for a course, the `preferred_source_of_username` is set, and this `namesrolesservice` URL has been obtained (by some user using content selection or a resource link). When this tab is available and its action used, the list of users in the LMS course will be obtained, and users will be created in webwork that do not already exist, users will be updated that do exist (if `LMSManageUserData` is true), and users not in the LMS course will have their status changed to dropped. Note that the data sent when using the `namesrolesservice` URL is not the same as that sent in a launch request. So there are some new options that control what is used for the username and student_id. See the options and documentation in `conf/authen_LTI_1_3.conf.dist`. Also note that this will never add, update, or modify in any way any users that have a role that is above the `LTIAccountCreationCutoff`. Note that when users are created or updated via the tab in the accounts manager and the `namesrolesservice` URL, the LMS `user_id` (or `sub`) is included in the data received and saved to the `lis_source_did` column for the user. So this means that for links created via deep linking with this pull request and users added or updated in this way, grade pass back is available immediately, even if the user never logs in to webwork via the LMS. Also fix plurality of some texts for some other similar action results in the accounts manager. Unfortunately the message on the assignments page stating "You must access this assignment from the LMS before you can start." is still shown even if an instructor uses deep linking to create links in the LMS. The problem is that although grade passabck will work for those sets, the lineitem URL is still not saved in the database for all of those sets. The lineitem is not obtained until grade pass back occurs or as before, a user uses the link from the LMS. So those that create all links via deep linking will most likely want to set `$LTI{v1p3}{ignoreMissingSourcedID}` so that users are not shown that message, and can access the sets. As such, I made that option one that can be made available for instructors to set on the LTI tab in the course configuration. Third, implement set date synchronization with the LMS. Set dates can be synchronized to or from the LMS. There is a new tab for this in the sets manager that is shown if LTI 1.3 with homework grade pass back is enabled and the general lineitems URL is available. Also there is a new LTI 1.3 option `$LTI{v1p3}{autoSyncSetDatesToLMS}`. If this is true, then anytime that dates are changed on the sets manager or problem set detail pages, a job to synchronize dates to the LMS will automatically be queued for the sets with dates changed. Note that only the open and due (or close) dates have an equivalent in the LTI specification, namely the start and end dates. So when synchronizing from an LMS, the reduced scoring date and answer date are adjusted if needed to make them fit into the dates received from the LMS. Of course, when sending dates, only the open and due date are sent. It is also important to note that date synchronization is not supported by all LMSs. Canvas does, but Moodle does not. As usual, I don't know what D2L or Blackboard support. One related small change is that set dates are now also set when grade pass back mode is homework and a link is created to a set via deep linking. Another small change to the deep linking response is that `window => { targetName => '_blank' }` is set. This makes Canvas open the links in a new window instead of being embedded in the page. This does not work for Moodle, and as far as I can tell, there is no way to make this happen from the deep linking response. Fortunately for Moodle users, the external tool can be set so that all links created that use the external tool open in a new window. Canvas on the other hand does not have that. So without this change, Canvas users that create links have to go edit each link and change it to open in a new window.
1 parent 79a7c65 commit 400f812

19 files changed

Lines changed: 866 additions & 64 deletions

File tree

conf/authen_LTI.conf.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ $LTIMassUpdateInterval = 86400;
241241
#'LTIMassUpdateInterval',
242242
#'LMSManageUserData',
243243
#'LTI{v1p1}{BasicConsumerSecret}',
244+
#'LTI{v1p3}{ignoreMissingSourcedID}',
245+
#'LTI{v1p3}{autoSyncSetDatesToLMS}',
244246
#'LTI{v1p3}{PlatformID}',
245247
#'LTI{v1p3}{ClientID}',
246248
#'LTI{v1p3}{DeploymentID}',

conf/authen_LTI_1_3.conf.dist

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,27 @@ $LTI{v1p3}{strip_domain_from_email} = 0;
8383
# lowercase.
8484
$LTI{v1p3}{lowercase_username} = 0;
8585

86+
# When the names/roles service URL is used for roster synchronization the LMS may use a
87+
# different key in the sent data than is used when a user signs in via LTI authentication. Set
88+
# the following keys to the correct key for your LMS that provides the same identifier via the
89+
# names/roles service URL as when LTI authentication is used if the key for the
90+
# preferred_source_of_username or fallback_source_of_username is different. Note that the
91+
# 'email' key is the same for all LMSs according to the LTI 1.3 specification. So if
92+
# preferred_source_of_username or fallback_source_of_username is 'email', then you should not
93+
# set the respective setting below. Also, the 'sub' key obtained during LTI authentication will
94+
# always match the 'user_id' key obtained from the names/roles service URL according to the LTI
95+
# 1.3 specification. So if preferred_source_of_username or fallback_source_of_username is
96+
# 'sub', then set the respective setting to 'user_id' below. For any other values of
97+
# preferred_source_of_username or fallback_source_of_username, set debug_lti_parameters to 1,
98+
# and compare the results when LTI authentication is performed and when using LMS roster
99+
# synchronization in the accounts manager to determine what (if anything) will work here.
100+
# Unfortunately, for values other than 'email' or 'sub', there is no guarantee that there will
101+
# be any valid key provided from the names/roles service URL, and so if you do not see anything
102+
# valid to use using debug_lti_parameters, then LTI roster synchronization in the accounts
103+
# manager is just not going to work for you.
104+
$LTI{v1p3}{namesroles_service_preferred_source_of_username} = '';
105+
$LTI{v1p3}{namesroles_service_fallback_source_of_username} = '';
106+
86107
################################################################################################
87108
# LTI 1.3 Preferred source of Student Id
88109
################################################################################################
@@ -92,6 +113,11 @@ $LTI{v1p3}{lowercase_username} = 0;
92113
# LMS. There may be no claim value that provides this.
93114
$LTI{v1p3}{preferred_source_of_student_id} = '';
94115

116+
# This is much the same as the namesroles_service_preferred_source_of_username and
117+
# namesroles_service_fallback_source_of_username above. See the documentation for those to
118+
# understand this setting.
119+
$LTI{v1p3}{namesroles_service_preferred_source_of_student_id} = '';
120+
95121
################################################################################################
96122
# LTI 1.3 Basic Authentication Parameters
97123
################################################################################################
@@ -212,14 +238,27 @@ $LTI{v1p3}{AllowInstitutionRoles} = 0;
212238
# Miscellaneous
213239
################################################################################################
214240

215-
# When grade passback mode is 'homework', someone must use a set-specific link from the LMS in
216-
# order for grade passback to begin happening for that set. Use of the set-specific link lets
217-
# WeBWorK store the set's "sourced_ID". So if there is no sourced_ID, the default behavior is
218-
# that a user in WeBWorK sees the sets as disabled and there is a message about needing to
219-
# access the set from the LMS. The following option can be set to allow users to work on the set
220-
# anyway. There will be no grade passback until some later time when an LMS user clicks the
221-
# set-specific link. In some LMSs, it is possible for the instructor to activate the link.
241+
# When grade passback mode is 'homework', webwork2 needs to have the lineitem URL for a set in
242+
# order for grade passback to occur. For manually created links to a webwork2 set in the LMS,
243+
# webwork2 obtains that URL the first time that someone uses the link, but for links created via
244+
# deep linking (content selection in the LMS), webwork2 can obtain that URL anytime it is
245+
# needed. If webwork2 does not have the lineitem URL stored in the database, the default
246+
# behavior is that a user in webwork2 sees the sets as disabled, and there is a message about
247+
# needing to access the set from the LMS. The following option can be set to allow users to work
248+
# on the set anyway. For manually created links, there will be no grade passback until some
249+
# later time when an LMS user uses the set-specific link. Note that in most LMSs, the instructor
250+
# can activate a link by using it. For links created via deep linking, grade passback will
251+
# always work, but webwork2 will not store the lineitem URL until the first time that grade
252+
# passback occurs, someone uses the set-specific link, or set dates are synchronized to the LMS.
253+
# So if you create all links in the LMS using deep linking (content selection), then you will
254+
# most likely want to set the following option, because the message about needing to access the
255+
# set from the LMS that is shown in the LMS is simply not true anyway.
222256

223257
$LTI{v1p3}{ignoreMissingSourcedID} = 0;
224258

259+
# Set the following option if you want webwork2 to automatically synchronize set dates to the
260+
# LMS anytime that a set's open and close dates are changed.
261+
262+
$LTI{v1p3}{autoSyncSetDatesToLMS} = 0;
263+
225264
1; # final line of the file to reassure perl that it was read properly.

htdocs/js/ProblemSetList/problemsetlist.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,14 @@
4949
err_msg?.classList.remove('d-none');
5050
if (!('set_table_id' in event_listeners)) {
5151
event_listeners.set_table_id = hide_errors(
52-
['filter_select', 'edit_select', 'publish_filter_select', 'export_select', 'score_select'],
52+
[
53+
'filter_select',
54+
'edit_select',
55+
'publish_filter_select',
56+
'export_select',
57+
'score_select',
58+
'lms_date_sync_select'
59+
],
5360
[err_msg]
5461
);
5562
document.getElementById('set_table_id')?.addEventListener('change', event_listeners.set_table_id);
@@ -72,7 +79,7 @@
7279
e.stopPropagation();
7380
show_errors(['filter_err_msg'], [filter_select, filter_text]);
7481
}
75-
} else if (['edit', 'publish', 'export', 'score'].includes(action)) {
82+
} else if (['edit', 'publish', 'export', 'score', 'lms_date_sync'].includes(action)) {
7683
const action_select = document.getElementById(`${action}_select`);
7784
if (action_select.value === 'selected' && !is_set_selected()) {
7885
e.preventDefault();

lib/Mojolicious/WeBWorK.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ sub startup ($app) {
7575
# WeBWorK::ContentGenerator::Instructor::JobManager.
7676
$app->plugin(Minion => { $ce->{job_queue}{backend} => $ce->{job_queue}{database_dsn} });
7777
$app->minion->add_task(lti_mass_update => 'Mojolicious::WeBWorK::Tasks::LTIMassUpdate');
78+
$app->minion->add_task(lti_set_date_sync => 'Mojolicious::WeBWorK::Tasks::LTISetDateSync');
7879
$app->minion->add_task(send_instructor_email => 'Mojolicious::WeBWorK::Tasks::SendInstructorEmail');
7980
$app->minion->add_task(send_achievement_email => 'Mojolicious::WeBWorK::Tasks::AchievementNotification');
8081

Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
package Mojolicious::WeBWorK::Tasks::LTISetDateSync;
2+
use Mojo::Base 'Minion::Job', -signatures, -async_await;
3+
4+
use Mojo::UserAgent;
5+
use Mojo::Date;
6+
7+
use WeBWorK::Authen::LTIAdvantage::SubmitGrade;
8+
use WeBWorK::CourseEnvironment;
9+
use WeBWorK::DB;
10+
use WeBWorK::Utils::DateTime qw(formatDateTime);
11+
12+
# Synchronize requested set dates to the LMS.
13+
sub run ($job, $setIDs, $syncToLMS = 1) {
14+
# Establish a lock guard that only allows 1 job at a time (technically more than one could run at a time if a job
15+
# takes more than an hour to complete). As soon as a job completes (or fails) the lock is released and a new job
16+
# can start. New jobs retry every minute until they can acquire their own lock.
17+
return $job->retry({ delay => 60 }) unless my $guard = $job->minion->guard('lti_set_date_sync', 3600);
18+
19+
# Minion does not support asynchronous jobs with notification of job completion, and so the Mojolicious::Promise
20+
# wait method must be used. The synchronizeSetDates method is used so that the async/await syntax can be used
21+
# instead of using the wait method on each method that needs to be awaited which would be tedious. So the wait
22+
# method only needs to be used once here.
23+
$job->synchronizeSetDates($setIDs, $syncToLMS)->wait();
24+
25+
return;
26+
}
27+
28+
async sub synchronizeSetDates ($job, $setIDs, $syncToLMS) {
29+
my $courseID = $job->info->{notes}{courseID};
30+
return $job->fail('The course id was not passed when this job was enqueued.') unless $courseID;
31+
32+
my $ce = eval { WeBWorK::CourseEnvironment->new({ courseName => $courseID }) };
33+
return $job->fail('Could not construct course environment.') unless $ce;
34+
35+
$job->{language_handle} = WeBWorK::Localize::getLoc($ce->{language} || 'en');
36+
37+
return $job->fail($job->maketext('This course is not configured to synchronize set dates with the LMS via LTI.'))
38+
if !$ce->{LTIVersion} || $ce->{LTIVersion} ne 'v1p3' || $ce->{LTIGradeMode} ne 'homework';
39+
40+
my $db = WeBWorK::DB->new($ce);
41+
return $job->fail($job->maketext('Could not obtain database connection.')) unless $db;
42+
43+
my $lineitemsURL = $db->getSettingValue('LTILineitemsURL');
44+
return $job->fail($job->maketext('Could not perform date synchronization. The lineitems URL is not available.'))
45+
unless $lineitemsURL;
46+
47+
my $accessToken =
48+
await WeBWorK::Authen::LTIAdvantage::SubmitGrade->new(({ ce => $ce, db => $db, app => $job->app }, 1))
49+
->get_access_token;
50+
return $job->fail($job->maketext('Could not perform date synchronization. Unable to obtain access token.'))
51+
unless $accessToken;
52+
53+
my $ua = Mojo::UserAgent->new;
54+
55+
my $lineitemsResult =
56+
(await $ua->get_p(
57+
$lineitemsURL, { Authorization => "$accessToken->{token_type} $accessToken->{access_token}" }))->result;
58+
59+
return $job->fail($job->maketext(
60+
'There was an error obtaining the current lineitems from the LMS: [_1]',
61+
$lineitemsResult->message
62+
))
63+
unless $lineitemsResult->is_success;
64+
65+
my %lineitems = map { $_->{resourceId} => $_ } grep { defined $_->{resourceId} } @{ $lineitemsResult->json };
66+
67+
my @messages;
68+
69+
for my $set ($db->getGlobalSetsWhere({ set_id => $setIDs })) {
70+
unless ($lineitems{ $set->set_id }) {
71+
# If a link to a set was not created via deep linking, then the lineitem obtained from the lineitems URL
72+
# will not have the resourceId. But if the link was used by someone, then the lineitem URL for the set will
73+
# be in the lis_source_did column for the set. So that can be used to get the current lineitem information
74+
# from the LMS.
75+
if ($set->lis_source_did) {
76+
my $lineitemResult = (await $ua->get_p(
77+
$set->lis_source_did,
78+
{ Authorization => "$accessToken->{token_type} $accessToken->{access_token}" }
79+
))->result;
80+
81+
if ($lineitemResult->is_success) {
82+
$lineitems{ $set->set_id } = $lineitemResult->json;
83+
84+
# Set the resourceId so that the LMS sends it the next time that date synchronization occurs.
85+
$lineitems{ $set->set_id }{resourceId} = $set->set_id;
86+
87+
# If not synchronizing dates to the LMS, then update the lineitem to the LMS now, so that the
88+
# resourceId will be set in the LMS. If synchronizing dates to the LMS this will be included when
89+
# the dates are sent, so it isn't needed now.
90+
if (!$syncToLMS) {
91+
my $updateLineitemResult = (await $ua->put_p(
92+
$lineitems{ $set->set_id }{id},
93+
{
94+
Authorization => "$accessToken->{token_type} $accessToken->{access_token}",
95+
'Content-Type' => 'application/vnd.ims.lis.v2.lineitem+json'
96+
},
97+
json => $lineitems{ $set->set_id }
98+
))->result;
99+
100+
# Don't add a message about this to the job. This is an internal implementation detail the
101+
# instructor that queued the job doesn't need to know about. Just log it.
102+
$job->app->log->error('Failed to update the resource id for set '
103+
. $set->set_id
104+
. ' while performering date synchronization.')
105+
if !$updateLineitemResult->is_success;
106+
}
107+
}
108+
}
109+
unless ($lineitems{ $set->set_id }) {
110+
push(
111+
@messages,
112+
$job->maketext(
113+
'Skipping synchronization of dates for "[_1]" as the lineitem for this set is not available.',
114+
$set->set_id
115+
)
116+
);
117+
next;
118+
}
119+
}
120+
121+
# Save the lineitem URL for the set if it is not yet in the database.
122+
if (!defined $set->lis_source_did || $set->lis_source_did ne $lineitems{ $set->set_id }{id}) {
123+
$set->lis_source_did($lineitems{ $set->set_id }{id});
124+
$db->putGlobalSet($set);
125+
}
126+
127+
if ($syncToLMS) {
128+
$lineitems{ $set->set_id }{startDateTime} = formatDateTime($set->open_date, '%Y-%m-%dT%H:%M:%S%z');
129+
$lineitems{ $set->set_id }{endDateTime} = formatDateTime($set->due_date, '%Y-%m-%dT%H:%M:%S%z');
130+
131+
my $updateLineitemResult = (await $ua->put_p(
132+
$lineitems{ $set->set_id }{id},
133+
{
134+
Authorization => "$accessToken->{token_type} $accessToken->{access_token}",
135+
'Content-Type' => 'application/vnd.ims.lis.v2.lineitem+json'
136+
},
137+
json => $lineitems{ $set->set_id }
138+
))->result;
139+
140+
if ($updateLineitemResult->is_success) {
141+
push(@messages, $job->maketext('Submitted dates for "[_1]" to the LMS.', $set->set_id));
142+
} else {
143+
push(
144+
@messages,
145+
$job->maketext(
146+
'Failed to submit dates for "[_1]" to the LMS: [_2]', $set->set_id,
147+
$updateLineitemResult->message
148+
)
149+
);
150+
}
151+
} else {
152+
my ($openDateChanged, $closeDateChanged) = (0, 0);
153+
if ($lineitems{ $set->set_id }{startDateTime}) {
154+
my $newOpenDate = Mojo::Date->new($lineitems{ $set->set_id }{startDateTime})->epoch;
155+
if (defined $newOpenDate) {
156+
$openDateChanged = 1 if $newOpenDate != $set->open_date;
157+
$set->open_date($newOpenDate);
158+
}
159+
}
160+
if ($lineitems{ $set->set_id }{endDateTime}) {
161+
my $newCloseDate = Mojo::Date->new($lineitems{ $set->set_id }{endDateTime})->epoch;
162+
if (defined $newCloseDate) {
163+
$closeDateChanged = 1 if $newCloseDate != $set->due_date;
164+
$set->due_date($newCloseDate);
165+
}
166+
}
167+
168+
# Only change dates if at least one date was received from the LMS. Some LMSs do not support dates and will
169+
# not send them at all, or the dates may just not be set in the LMS in which case they also will not be
170+
# sent.
171+
unless ($openDateChanged || $closeDateChanged) {
172+
push(@messages, $job->maketext('The dates for "[_1]" were not changed.', $set->set_id));
173+
next;
174+
}
175+
176+
# The following assumes that if the instructor is using synchronization of dates from the LMS, then the
177+
# instructor wants those dates to be used. As such, this tries to make the dates work with the other dates
178+
# for the set.
179+
180+
if ($set->open_date > $set->due_date) {
181+
if ($lineitems{ $set->set_id }{startDateTime} && $lineitems{ $set->set_id }{endDateTime}) {
182+
push(
183+
@messages,
184+
$job->maketext(
185+
'Error setting dates for [_1]: Invalid dates received from the LMS. '
186+
. 'The start date was not before the end date.',
187+
$set->set_id
188+
)
189+
);
190+
next;
191+
}
192+
# If one of the dates was received from the LMS, but not the other, and the current date stored for the
193+
# other does not work with the received date, then adjust the other date to make it work.
194+
if ($openDateChanged && !$closeDateChanged) {
195+
$set->due_date($set->open_date + 60 * $ce->{pg}{assignOpenPriorToDue});
196+
} elsif (!$openDateChanged && $closeDateChanged) {
197+
$set->open_date($set->due_date - 60 * $ce->{pg}{assignOpenPriorToDue});
198+
}
199+
}
200+
201+
$set->answer_date($set->due_date + 60 * $ce->{pg}{answersOpenAfterDueDate})
202+
if $set->answer_date < $set->due_date;
203+
204+
if (!$set->reduced_scoring_date
205+
|| $set->reduced_scoring_date < $set->open_date
206+
|| $set->reduced_scoring_date > $set->due_date)
207+
{
208+
if ($ce->{pg}{ansEvalDefaults}{enableReducedScoring} && $set->enable_reduced_scoring) {
209+
$set->reduced_scoring_date($set->due_date - 60 * $ce->{pg}{ansEvalDefaults}{reducedScoringPeriod});
210+
211+
# If using the reducedScoringPeriod results in a time before the open date,
212+
# then just use the due date.
213+
$set->reduced_scoring_date($set->due_date) if $set->reduced_scoring_date < $set->open_date;
214+
} else {
215+
$set->reduced_scoring_date($set->due_date);
216+
}
217+
}
218+
219+
$db->putGlobalSet($set);
220+
221+
if ($ce->{pg}{ansEvalDefaults}{enableReducedScoring} && $set->enable_reduced_scoring) {
222+
push(
223+
@messages,
224+
$job->maketext(
225+
'Changed dates for "[_1]" to: open date: [_2], reduced scoring date: [_3], '
226+
. 'close date: [_4], answer date: [_5]',
227+
$set->set_id,
228+
(
229+
map {
230+
formatDateTime($set->$_, 'datetime_format_short', $ce->{siteDefaults}{timezone},
231+
$ce->{language})
232+
} 'open_date',
233+
'reduced_scoring_date',
234+
'due_date',
235+
'answer_date'
236+
)
237+
)
238+
);
239+
} else {
240+
push(
241+
@messages,
242+
$job->maketext(
243+
'Changed dates for "[_1]" to: open date: [_2], close date: [_3], answer date: [_4]',
244+
$set->set_id,
245+
(
246+
map {
247+
formatDateTime($set->$_, 'datetime_format_short', $ce->{siteDefaults}{timezone},
248+
$ce->{language})
249+
} 'open_date',
250+
'due_date',
251+
'answer_date'
252+
)
253+
)
254+
);
255+
}
256+
}
257+
}
258+
259+
return $job->finish(@messages > 1 ? \@messages : $messages[0]);
260+
}
261+
262+
sub maketext ($job, @args) {
263+
return &{ $job->{language_handle} }(@args);
264+
}
265+
266+
1;

lib/WeBWorK/Authen/LTIAdvantage.pm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ sub get_credentials ($self) {
197197
$c->stash->{lti_lms_user_id} = $claims->{sub};
198198
$c->stash->{lti_lms_lineitem} =
199199
$extract_claim->('https://purl.imsglobal.org/spec/lti-ags/claim/endpoint#lineitem');
200+
$c->stash->{lti_lms_lineitems_url} =
201+
$extract_claim->('https://purl.imsglobal.org/spec/lti-ags/claim/endpoint#lineitems');
202+
$c->stash->{lti_lms_namesrolesservice_url} =
203+
$extract_claim->('https://purl.imsglobal.org/spec/lti-nrps/claim/namesroleservice#context_memberships_url');
200204

201205
# Extract a possible setID from the target_link_uri. This may not be an actual setID.
202206
# That will be verified later in WeBWorK::Authen::LTIAdvantage::SubmitGrade::update_sourcedid.

0 commit comments

Comments
 (0)