LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

Greg Myles -
回帖数:17

Hi,

I've been unable to get dynamic registration working when Moodle is the platform and any other LMS is the consumer. Moodle > Moodle seems to work every time.

Moodle 4.1 > Canvas - When the dynamic reg link is added to Canvas the 'register app' window opens but is blank
Moodle 4.1 > D2L - "A required parameter (registration_token) was missing" error shows from Moodle
Moodle 4.1 > Blackboard - as above (I think..) - trying to attempt a manual config but struggling with that

So it looks like the cause *might* be the same thing in all cases? I'm told that dynamic reg works for some other providers so this has me stumped. Any insights gratefully received.

回复Greg Myles

Re: LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

Jake Dallimore -
Core developers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像 Testers的头像
Hi Greg,

First up, just to clarify, platform and consumer are synonyms in LTI land, but I know you meant Moodle is the tool (not platform).

When we built the tool dynamic registration, at that time, no other LMSs had support for that spec, so it's not surprising there are hiccups. I've confirmed Blackboard does does work (or CAN work), but it's with a caveat: Blackboard need to fix a blocker bug on their end with URL encoding that (was, perhaps still is), preventing that from working. See MDL-81409, where that problem with blackboard is mentioned. In a nutshell, they aren't passing over the one time use registration token properly, and it's not in our power to fix. I already lodged this with Blackboard but heard nothing back. Our Moodle US team was also hit by this and probably followed up directly with Blackboard too, but I've not heard any update. It could still be broken for all I know.

Wrt to the others:

Canvas: anything in your browser network trace? request/responses that look funny?
D2L: Sounds like perhaps a similar problem to that of Blackboard in that they're not properly sending the registration token in the URL. The bottom line is that, if we provide a URL like 'https://example-tool.org/register?regtoken=abc', the tool needs to send that back to us, and any additional params need to be included using '&param=x&param2=y' etc. That was the issue with Blackboard. Maybe the same issue for D2L? I can't say for sure as I don't have access to D2L to test myself.
回复Jake Dallimore

Re: LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

Greg Myles -
I'm now able to set up manual connections in Blackboard, so that's no longer an issue for us. Canvas however, I can't get to work. We did some investigation into why dynamic reg was failing on Canvas but didn't uncover anything untowards, so we're pursuing the manual setup route.

Upon manual setup, we're seeing an error "LTI 1.3 registration not found for issuer" (attached) when trying to launch the tool on Canvas. I can't see anything obvious wrong with the set up - I referred to an earlier post here to map the fields from Moodle > Canvas to set up the tool. Does this error point to simply entering a wrong URL somewhere - and if so, which fields are the most likely candidates? Is there a guide or other resource that might help somewhere?
 
Canvas LTI error
 
thank you
回复Greg Myles

Re: LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

Liam Moran -
Core developers的头像
Hi Greg:

This is the procedure that I originally used to configure Canvas as a platform and Moodle as a tool, the context of which may be amusing to many.
 
When configuring the LTI Key in Canvas:
 
I don't use force_embed=1 in custom fields and do include other launch data there in step 12 of "Setup Canvas as an LTI Consumer".
 
In step 14 of that section, I recommend including "Assignment Selection" in addition to "Link Selection" in the Placements field. Otherwise Moodle will be missing from the LTI picker list in the assignment configuration menu.
 
Hope that helps you get unstuck.
回复Liam Moran

Re: LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

Stuart Anderson -
Thanks for providing the link to the Canvas Community post. This information helped a bit, but also sent me in the wrong direction as some of the information was wrong in my opinion. In the section titled "Add the Deployment to Moodle", the settings I needed to add to get this to work are listed in the below table.  This information is mostly pulled from the Canvas developer documentation here: https://canvas.instructure.com/doc/api/file.lti_dev_key_config.html, which wasn't easy to follow, but I got there in the end.
 

Copy information from the platform registration into the Platform details area of the moodle platform registration. The field names correspond to each other as per this table:

 
 

moodle naming

 

Canvas naming

 

Platform ID (issuer)

Client ID

  • Client ID

    • e.g. 123450000000000123

Authentication request URL

Public keyset URL

Access token URL

 

 Hope this helps others with moodle (tool) to Canvas (platform) integrations.

 

回复Stuart Anderson

Re: LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

Liam Moran -
Core developers的头像

Thanks for this: I set mine up prior to that documentation you linked to, so I should start updating my integrations to use that ne authentication fqdn and make sure that nothing breaks!

回复Liam Moran

Re: LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

Stuart Anderson -
Hi Liam,
 
You said "I don't use force_embed=1 in custom fields and do include other launch data there" and you linked to the variable substations page in the Canvas dev docs. 
  • Why don't you use force_embed (I've not looked into the effect of leaving it out yet)?
  • What useful variable substitutions are supported by moodle LTI 1.3 as a tool? Is there a list anywhere? 

Best wishes,

Stuart

 
回复Stuart Anderson

Re: LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

Liam Moran -
Core developers的头像
That might be a little idiosyncratic, but the decision on force_embed was so we could control the layouts in the theme based on whether the initial launch arrived for a full course or an activity within a course. If a course design is using specific Moodle activities within canvas, we strip out all navigation for students and add minimal navigation for teachers so they can still easily manage their course; if the students are to launch into a course and click around different activities, then we need to leave navigation intact. We also make different postmessage calls against canvas depending on which of those two design options are in use to maximize space for the moodle-containing iframe and remove potentially confusing navigation controls in Canvas.

$Canvas.user.loginId
We needed the canonical username for user account creation instead of the obfuscated LTI sub username so that we can launch LTI activities from the Moodle LTI tool with the same user that the platform would use. (For example, so they see their video collection in our video management system). The lis_person_sourcedid is provided with sync_members data from the NRPS, but not with launch data (Moodle's mod_lti sends it in claim at launch, so great job, HQ). 
 
$com.instructure.User.sectionNames
We needed to sync SIS-generated section names in Canvas with Moodle groups.
 
$Canvas.user.sisIntegrationId
This other id was needed for a library-related LTI integration we needed to support in the tool.

$Canvas.api.baseUrl
$Canvas.course.id
$Canvas.moduleItem.id
These are used for a local plugin I wrote to, among other things, route 403 requests to the launch point that gets the user closest to that requested context so that auth_lti acts like a real authentication plugin if someone follows a direct link to a resource on the LTI tool instead of arriving from the platform able to authenticate. baseurl was needed since, as you discovered, the app registration doesn't use the vanity urls for the instance of canvas, and I thought this preferable to parsing it from the NPRS or AGS urls, if provided.
回复Liam Moran

Re: LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

Stuart Anderson -
Thanks Liam. Had a busy week so only now getting chance to look at your reply in detail.

RE: 
$Canvas.user.loginId
We needed the canonical username for user account creation instead of the obfuscated LTI sub username so that we can launch LTI activities from the Moodle LTI tool with the same user that the platform would use. (For example, so they see their video collection in our video management system). The lis_person_sourcedid is provided with sync_members data from the NRPS, but not with launch data (Moodle's mod_lti sends it in claim at launch, so great job, HQ). 
This might be of interest to me I think, but I think I must have the setup wrong.  In the Canvas Developer Key settings for the moodle as a tool setup, under the Additional Settings I added the customer parameter:
 
User.username=$Canvas.user.loginId
 
I was trying to get new LTI accounts in moodle created the login name they have in Canvas, but the accounts in moodle were still created with the obfuscated LTI sub username.  Have I got that right?  The problem could also have been down to my testing process which relied on Canvas impersonation of a test user or another aspect of my test.
 
Thanks,
Stuart
回复Stuart Anderson

Re: LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

Liam Moran -
Core developers的头像

This is a core hack that I haven't refined enough for a potential contribution... 

Here's the essential change we've used in production for almost a year.


That's part of this issue, to allow for site-administration controls of auth_lti.

回复Liam Moran

Re: LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

Stuart Anderson -
Thanks. Sadly, I won't be able to add hacks to my moodle code because of our internal policy. However, I have "upvoted" the issue you raised in the Moodle Tracker.
回复Stuart Anderson

Re: LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

Liam Moran -
Core developers的头像
回复Liam Moran

Re: LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

Stuart Anderson -
Those links are dead, but it's fine I think. I didn't experience any problems with impersonations. I had accounts created in moodle with email address after the users sync and I had scores being pushed back from moodle to Canvas without any issue. For my use case, we only need moodle as a tool to run quizzes (using the STACK question type predominantly).

Cheers for your help.
回复Greg Myles

Re: LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

Brett Dalton -
Moodle HQ的头像 Particularly helpful Moodlers的头像

Are you trying to set this up in a Canvas Free for teacher account? that would be the only DNS using canvas.instructure.com

回复Brett Dalton

Re: LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

Liam Moran -
Core developers的头像

I don't believe that is so: all of my working integrations use that fqdn (or canvas.test.instructure.com) for platformid, authenticationrequesturl, jwksurl, and accesstokenurl in the enrol_lti_app_registration tables.

The LTI Advantage service endpoints use the instance-specific vanity URLs, though. I recall finding the launch URLs odd when I first successfully configured an integration with Canvas.

回复Liam Moran

Re: LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

Greg Myles -

Thanks Liam, this is really helpful. I've put together a manual setup guide based on the one you shared and have sent this to a partner to test. I'll post an update here with the result l along with any additional info that others might find useful.

回复Greg Myles

Re: LTI 1.3 Dynamic Registration / Moodle > Non-Moodle LMS

Jake Dallimore -
Core developers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像 Testers的头像
Possibly helpful (but also maybe not): When I tested end to end in Canvas back when building this (manual registration method only), they had a bug with their JWKS URL implementation meaning I had to manually use the key by copy-pasting it from the Moodle tool JWKS into Canvas. Iirc, there were a few posts on Canvas forums about this, but I also assume that it's probably now patched (though maybe not?). Probably not the source of your pain, but just something else that came to mind with Canvas.