Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-81409

Several fixes to tool dynamic registration to align with specs

XMLWordPrintable

    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-81409-403
    • MDL-81409-main
    • Hide

      Moodle-to-Moodle Dynamic Registration regression testing:

      1. Create 2 sites, one called tool, one called platform
      2. In the tool site admin settings:
        • Enable enrol_lti and auth_lti plugins
        • Enable "Allow frame embedding"
      3. In both sites, remove any HTTP security blocked hosts (this permits localhost to localhost)
      4. Login to the tool site as admin
      5. Go to 'Site admin > Plugins > Enrolment plugins > Publish as LTI tool > Tool registration'
      6. Click to add a new registration
      7. Name is "platform local" and proceed
      8. Copy the dynamic registration URL when you see it
      9. Now, in another tab, login to the platform site as the admin
      10. Go to 'Site admin > Plugins > Activity plugins > External tool > manage tools'
      11. Paste the registration URL you copied just before in to the text area and click "Add LTI Advantage"
      12. Verify:
        • You see a registration pane briefly, but it closes and takes you back to the tool listing
        • You then see a tool card for the tool site, listed as "pending" (i.e. not activated).

      Blackboard Learn to Moodle Dynamic Registration testing

      1. Firstly, we need to apply a small local hack, that gets around a urlencoding bug on Blackboard's end. In the tool site web root, run:

        git fetch https://github.com/snake/moodle.git blackboard-dynreg-urlencoding-bug-workaround
        git cherry-pick FETCH_HEAD
        

      2. Now, expose your Tool site over ngrok or something like that (you want a public, https URL)
      3. Login to the tool site as admin
      4. Go to 'Site admin > Plugins > Enrolment plugins > Publish as LTI tool > Tool registration'
      5. Click to add a new registration
      6. Name is "Blackboard Learn Dev" and proceed
      7. Copy the dynamic registration URL when you see it, but leave this page open
      8. Now, in another tab, go to https://developer.anthology.com/portal/applications. This requires credentials which I can PM you when needed.
      9. Click "LTI Dynamic Registration"
      10. Paste the registration URL into the field and click "Ok"
      11. Verify:
        • You see a popup tab briefly
        • This tab closes automatically
        • You're then taken back to the "My applications" view on Blackboard Learn
        • You can see your application listed there
      12. Now, in the tool site, click the "back" button to go back to the Registered platforms listing
      13. Verify
        • Blackboard Learn is listed with status "Active"
        • Under Deployments column, the number is 0 (this is expected since Blackboard doesn't return a deployment id as part of dynamic registration)
      Show
      Moodle-to-Moodle Dynamic Registration regression testing: Create 2 sites, one called tool, one called platform In the tool site admin settings: Enable enrol_lti and auth_lti plugins Enable "Allow frame embedding" In both sites, remove any HTTP security blocked hosts (this permits localhost to localhost) Login to the tool site as admin Go to 'Site admin > Plugins > Enrolment plugins > Publish as LTI tool > Tool registration' Click to add a new registration Name is "platform local" and proceed Copy the dynamic registration URL when you see it Now, in another tab, login to the platform site as the admin Go to 'Site admin > Plugins > Activity plugins > External tool > manage tools' Paste the registration URL you copied just before in to the text area and click "Add LTI Advantage" Verify : You see a registration pane briefly, but it closes and takes you back to the tool listing You then see a tool card for the tool site, listed as "pending" (i.e. not activated). Blackboard Learn to Moodle Dynamic Registration testing Firstly, we need to apply a small local hack, that gets around a urlencoding bug on Blackboard's end. In the tool site web root, run: git fetch https://github.com/snake/moodle.git blackboard-dynreg-urlencoding-bug-workaround git cherry-pick FETCH_HEAD Now, expose your Tool site over ngrok or something like that (you want a public, https URL) Login to the tool site as admin Go to 'Site admin > Plugins > Enrolment plugins > Publish as LTI tool > Tool registration' Click to add a new registration Name is "Blackboard Learn Dev" and proceed Copy the dynamic registration URL when you see it, but leave this page open Now, in another tab, go to https://developer.anthology.com/portal/applications . This requires credentials which I can PM you when needed. Click "LTI Dynamic Registration" Paste the registration URL into the field and click "Ok" Verify : You see a popup tab briefly This tab closes automatically You're then taken back to the "My applications" view on Blackboard Learn You can see your application listed there Now, in the tool site, click the "back" button to go back to the Registered platforms listing Verify Blackboard Learn is listed with status "Active" Under Deployments column, the number is 0 (this is expected since Blackboard doesn't return a deployment id as part of dynamic registration)
    • 1
    • Team Alpha - Sprint 4 I1-2024

      See this code:
      https://github.com/moodle/moodle/blob/6f54ece65581c55ee886e9277078ddee197c5393/enrol/lti/register.php#L56-L59

      And then see the spec (which wasn't finalised when we built this):
      https://www.imsglobal.org/node/200666#step-1-registration-initiation-request

      Specifically:

      The initiation launch is a User Agent redirect to the initiation registration URL and appends the following query parameters to the URL:

      openid_configuration: the endpoint to the open id configuration to be used for this registration, encoded as per [RFC3986] Section 3.4.

      registration_token (optional): the registration access token. If present, it must be used as the access token by the tool when making the registration request to the registration endpoint exposed in the openid configuration.

      The registration token should be:

      short lived - typically 1 hour to allow enough time for some UI interaction on the tool side happening before the actual registration request is made.

      usable only once - the token must not allow more than one registration

      We just need to validate it as an optional field, and ensure that it's conditionally added to the requests headers as a bearer token.

      Currently, this bug, along with a bug on Blackboard's side, prevents us from using dynamic registration with Blackboard. Let's fix this.

      There are likely a few other discrepancies we'll find, so we should fix these as we test this.

            jaked Jake Dallimore
            jaked Jake Dallimore
            Darko Miletic Darko Miletic
            Mihail Geshoski Mihail Geshoski
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            10 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 16 minutes
                3h 16m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.