Is it possible to launch an LTI assignment_selection placement item in a new window?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2023
03:11 PM
I'm creating a basic assignment selection placement LTI item and would like it to trigger a new window. Is that not possible? This is what my deep linking response message looks like but it still opens in an iframe:
exp: Math.floor((Date.now() + 86400000) / 1000),
iat: Math.floor(Date.now() / 1000),
iss: payload.azp,
aud: payload.iss,
nonce: payload.nonce,
'https://purl.imsglobal.org/spec/lti/claim/deployment_id':
payload['https://purl.imsglobal.org/spec/lti/claim/deployment_id'],
'https://purl.imsglobal.org/spec/lti/claim/message_type': 'LtiDeepLinkingResponse',
'https://purl.imsglobal.org/spec/lti/claim/version': '1.3.0',
'https://purl.imsglobal.org/spec/lti-dl/claim/data':
payload['https://purl.imsglobal.org/spec/lti-dl/claim/data'],
'https://purl.imsglobal.org/spec/lti-dl/claim/content_items': [
{
type: 'ltiResourceLink',
title: 'Title',
text: 'Description.',
url: 'https://myngrokurl.com',
lineItem: {
scoreMaximum: 10,
label: 'Item',
resourceId: 'itemid',
},
custom: {
sis_course_id: '$Canvas.course.sisSourceId',
course_id: '$Canvas.course.id',
assignment_id: '$Canvas.assignment.id',
},
window: {
targetName: '_parent',
},
},
Solved! Go to Solution.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023
01:25 PM
Alright it turns out you need to pass `windowTarget: "_blank"` in the content_items object as opposed to what I was passing and what is documented in the IMSGlobal docs. This different param is talked about under Navigation Tools even though it doesn't mention asssignment placement on that page. The following works to open the item in a new window/tab:
'https://purl.imsglobal.org/spec/lti-dl/claim/data':
payload['https://purl.imsglobal.org/spec/lti-dl/claim/data'],
'https://purl.imsglobal.org/spec/lti-dl/claim/content_items': [
{
type: 'ltiResourceLink',
title: 'Title',
text: 'Description.',
url: 'https://myngrokurl.com',
custom: {
sis_course_id: '$Canvas.course.sisSourceId',
course_id: '$Canvas.course.id',
assignment_id: '$Canvas.assignment.id',
},
windowTarget: '_blank'
},
]