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

Add dynamic registration support to the tool

XMLWordPrintable

    • MOODLE_400_STABLE
    • MDL-69862-master
    • Hide

      Prerequisites

      1. You need two Moodle sites (localhost is fine) - one called 'platform' and one called 'tool'
      2. In the tool site admin settings:
        • Enable enrol_lti and auth_lti plugins
        • Enable "Allow frame embedding"
      3. In BOTH sites:
        • Go to "Administration > Security > HTTP security" and clear all values from the 'curlsecurityblockedhosts' admin setting and save. (to permit localhost-to-localhost calls)

      Generate a registration URL (including manual registration URL copy regression testing)

      1. As an admin, in the tool site, go to Admin > Plugins > Enrolment plugins > Publish as LTI tool > Tool registration
      2. Verify you a section called "Registration endpoints", with two tabs, "Dynamic registration" and "Manual registration"
      3. Click the "Manual registration" tab
      4. Now, for each of the URLs present there (Tool, Login, JWKS, Deep linking), verify the following:
        • You can tab into text field, and doing so selects the entire URL (allowing control + c copying if desired)
        • You can tab to the clipboard button, at which point the text in the URL is no longer selected
        • You can hit enter when on the clipboard button to copy the text to clipboard, and you'll see a toast notice at the top of the page describing which field was copied.
        • You can paste the value copied from clipboard (just paste into a text file somewhere and confirm the URL matches that of the URL on the page)
        • You can click on the URL text field and that also results in the field being selected (first click only)
        • Subsequent clicks in a URL field result in a deselection, allowing portions of the URL to be copied (i.e. drag and select whatever text you want)
        • You can click the clipboard button and that will also result in a "Copied to clipboard" toast notice, just as pressing enter did earlier.
      5. Go back to the "Dynamic registration" tab
      6. Click "Generate registration URL"
      7. Verify:
        • You see a toast notice saying the URL was generated
        • You see a URL field with two buttons for "Copy to clipboard" and "Delete"
        • The "Generate registration URL" button is now disabled.
      8. Mouse over the "Generate registration URL" button and verify you see descriptive text telling you that you must use or delete the existing URL before you can generate another one.
        For the dynamic registration URL (the text field + 2 buttons), verify the following.
        • You can tab into text field, and doing so selects the entire URL (allowing control + c copying if desired)
        • You can tab to the clipboard button, at which point the text in the URL is no longer selected
        • You can hit enter when on the clipboard button to copy the text to clipboard, and you'll see a toast notice at the top of the page describing which field was copied.
        • You can paste the value copied from clipboard (just paste into a text file somewhere and confirm the URL matches that of the URL on the page)
        • You can click on the URL text field and that also results in the field being selected (first click only)
        • Subsequent clicks in a URL field result in a deselection, allowing portions of the URL to be copied (i.e. drag and select whatever text you want)
        • You can click the clipboard button and that will also result in a "Copied to clipboard" toast notice, just as pressing enter did earlier.
      9. Tab into the "Delete" button and hit enter
      10. Verify you're asked to confirm the action
      11. Hit "Cancel" and Verify nothing happens (no change in the page, but the modal closes)
      12. Tab into the "Delete" button and hit enter
      13. Confirm the action
      14. Verify:
        • You see a toast notice confirming the deletion
        • The "Generate registration URL" button is once again enabled
      15. Click "Generate registration URL"
        • Verify you see a new URL created
      16. Repeat this deletion process, this time use click instead of tab+enter. Verify you can delete the registration URL this way too.

      Use a registration URL

      1. Generate a registration URL via the admin - as in the first part of the testing.
      2. Copy the value to the clipboard but also paste it into a text file for later use
      3. Now, in the Platform site, go to Admin > Plugins > Activities > External tool > Manage tools
      4. Paste the URL value into the "Tool URL" field
      5. Click "Add LTI Advantage"
      6. Verify:
        • You see a tool card created below
        • The tool card needs activation (i.e. says "Pending" and there is an "Activate" button at the bottom of the card)
      7. Activate the tool
      8. Edit the tool, and set " Tool configuration usage" to "Show in activity chooser and as a preconfigured tool"
      9. Save
      10. Now, go to a course and add a new activity, selecting the "Moodle" tool
      11. Click the "Select content" button
      12. Verify you see a modal asking you to login to link your tool account (this confirms the launches are working). Don't proceed.
      13. Log in to the tool site as admin
      14. Go to Admin > Plugins > Enrolment plugins > Publish as LTI tool > Tool registration
      15. Verify you don't see any dynamic registration URL present (it has been used up)
      16. Under "Registered Platforms" below, Verify the following:
        • You see a single platform registration entry
        • You see a single deployment for that registration

      Use an expired/consumed registration URL

      1. Now, in the Platform site, go to Admin > Plugins > Activities > External tool > Manage tools
      2. Paste the URL value into the "Tool URL" field
      3. Click "Add LTI Advantage". You'll be presented with upgrade options and will see a notice about having multiple tools under the same domain. Just ignore these options.
      4. Click the "Register as a new external tool" button at the bottom of the page.
      5. Verify:
        • You see an error message stating that the URL is expired or invalid.
      6. Click "Cancel"
      7. Refresh the page
      8. Verify you don't see any new pending tool card.

      Dynamic registration in-place update

      1. First, we need to remove any prior registrations from earlier parts of the test:
        • In the platform site, via admin > manage tools, delete the Moodle preconfigured tool
        • In the tool site, go to Plugins > Enrolment plugins > Publish as LTI tool > Tool registration
        • From the Registered Platforms list, delete the ltiplatform entry using the bin/trash icon.
        • Delete any existing dynamic registration URL
      2. Now, in the tool site, create a new course called "LTI 1.1 Course"
      3. Create an assignment called "Assign 1"
      4. Go to Course settings > Published as LTI tools and click 'Add'
      5. Change the version to "Legacy LTI (1.1/2.0)" and select the "Assign 1" activity
      6. Save
      7. Verify you see the published activity listed under the "Legacy LTI (1.1/2.0)" tab
      8. Copy the Launch URL and Secret (under the launch details column) for later use.
      9. Log out of the tool.
      10. Now, in the platform site, go to Admin > Plugins > Activities > External tool > Manage tools
      11. Click "Configure a tool manually"
      12. Set the following values:
        • Set Tool name to "1.1 Site level tool"
        • Set LTI version to "LTI 1.0/1.1"
        • Paste the Launch URL you copied before into the Tool URL field
        • Paste the Secret you copied before into the Shared Secret field
        • Set consumer key to "Consumer_1"
      13. Save the form
      14. Verify you see the tool card listed
      15. Now, log in to the tool site again, and go to Admin > Plugins > Enrolment plugins > Publish as LTI tool > tool registration
      16. Generate a new dynamic registration URL and copy it to the clipboard.
      17. Go back to the ltiplatform site and go to Admin > Plugins > Activities > External tool > Manage tools
      18. Paste the dynamic registration URL into the text field
      19. Click "Add new LTI Advantage"
      20. Verify you're taken to a page listing the "1.1 Site level tool" as an existing tool on the same domain
      21. Click the "Update" button next to the "1.1 site level tool" entry
      22. Now, when you're taken back to the manage tools page, verify:
        • You see a tool card for "Moodle"
        • You don't see a tool card for "1.1 Site level tool" (it has been updated in place)
      Show
      Prerequisites You need two Moodle sites (localhost is fine) - one called 'platform' and one called 'tool' In the tool site admin settings: Enable enrol_lti and auth_lti plugins Enable "Allow frame embedding" In BOTH sites: Go to "Administration > Security > HTTP security" and clear all values from the 'curlsecurityblockedhosts' admin setting and save. (to permit localhost-to-localhost calls) Generate a registration URL (including manual registration URL copy regression testing) As an admin, in the tool site, go to Admin > Plugins > Enrolment plugins > Publish as LTI tool > Tool registration Verify you a section called "Registration endpoints", with two tabs, "Dynamic registration" and "Manual registration" Click the "Manual registration" tab Now, for each of the URLs present there (Tool, Login, JWKS, Deep linking), verify the following : You can tab into text field, and doing so selects the entire URL (allowing control + c copying if desired) You can tab to the clipboard button, at which point the text in the URL is no longer selected You can hit enter when on the clipboard button to copy the text to clipboard, and you'll see a toast notice at the top of the page describing which field was copied. You can paste the value copied from clipboard (just paste into a text file somewhere and confirm the URL matches that of the URL on the page) You can click on the URL text field and that also results in the field being selected (first click only) Subsequent clicks in a URL field result in a deselection, allowing portions of the URL to be copied (i.e. drag and select whatever text you want) You can click the clipboard button and that will also result in a "Copied to clipboard" toast notice, just as pressing enter did earlier. Go back to the "Dynamic registration" tab Click "Generate registration URL" Verify : You see a toast notice saying the URL was generated You see a URL field with two buttons for "Copy to clipboard" and "Delete" The "Generate registration URL" button is now disabled. Mouse over the "Generate registration URL" button and verify you see descriptive text telling you that you must use or delete the existing URL before you can generate another one. For the dynamic registration URL (the text field + 2 buttons), verify the following . You can tab into text field, and doing so selects the entire URL (allowing control + c copying if desired) You can tab to the clipboard button, at which point the text in the URL is no longer selected You can hit enter when on the clipboard button to copy the text to clipboard, and you'll see a toast notice at the top of the page describing which field was copied. You can paste the value copied from clipboard (just paste into a text file somewhere and confirm the URL matches that of the URL on the page) You can click on the URL text field and that also results in the field being selected (first click only) Subsequent clicks in a URL field result in a deselection, allowing portions of the URL to be copied (i.e. drag and select whatever text you want) You can click the clipboard button and that will also result in a "Copied to clipboard" toast notice, just as pressing enter did earlier. Tab into the "Delete" button and hit enter Verify you're asked to confirm the action Hit "Cancel" and Verify nothing happens (no change in the page, but the modal closes) Tab into the "Delete" button and hit enter Confirm the action Verify : You see a toast notice confirming the deletion The "Generate registration URL" button is once again enabled Click "Generate registration URL" Verify you see a new URL created Repeat this deletion process, this time use click instead of tab+enter. Verify you can delete the registration URL this way too. Use a registration URL Generate a registration URL via the admin - as in the first part of the testing. Copy the value to the clipboard but also paste it into a text file for later use Now, in the Platform site, go to Admin > Plugins > Activities > External tool > Manage tools Paste the URL value into the "Tool URL" field Click "Add LTI Advantage" Verify : You see a tool card created below The tool card needs activation (i.e. says "Pending" and there is an "Activate" button at the bottom of the card) Activate the tool Edit the tool, and set " Tool configuration usage" to "Show in activity chooser and as a preconfigured tool" Save Now, go to a course and add a new activity, selecting the "Moodle" tool Click the "Select content" button Verify you see a modal asking you to login to link your tool account (this confirms the launches are working). Don't proceed. Log in to the tool site as admin Go to Admin > Plugins > Enrolment plugins > Publish as LTI tool > Tool registration Verify you don't see any dynamic registration URL present (it has been used up) Under "Registered Platforms" below, Verify the following: You see a single platform registration entry You see a single deployment for that registration Use an expired/consumed registration URL Now, in the Platform site, go to Admin > Plugins > Activities > External tool > Manage tools Paste the URL value into the "Tool URL" field Click "Add LTI Advantage". You'll be presented with upgrade options and will see a notice about having multiple tools under the same domain. Just ignore these options. Click the "Register as a new external tool" button at the bottom of the page. Verify : You see an error message stating that the URL is expired or invalid. Click "Cancel" Refresh the page Verify you don't see any new pending tool card. Dynamic registration in-place update First, we need to remove any prior registrations from earlier parts of the test: In the platform site, via admin > manage tools, delete the Moodle preconfigured tool In the tool site, go to Plugins > Enrolment plugins > Publish as LTI tool > Tool registration From the Registered Platforms list, delete the ltiplatform entry using the bin/trash icon. Delete any existing dynamic registration URL Now, in the tool site, create a new course called "LTI 1.1 Course" Create an assignment called "Assign 1" Go to Course settings > Published as LTI tools and click 'Add' Change the version to "Legacy LTI (1.1/2.0)" and select the "Assign 1" activity Save Verify you see the published activity listed under the "Legacy LTI (1.1/2.0)" tab Copy the Launch URL and Secret (under the launch details column) for later use. Log out of the tool. Now, in the platform site, go to Admin > Plugins > Activities > External tool > Manage tools Click "Configure a tool manually" Set the following values: Set Tool name to "1.1 Site level tool" Set LTI version to "LTI 1.0/1.1" Paste the Launch URL you copied before into the Tool URL field Paste the Secret you copied before into the Shared Secret field Set consumer key to "Consumer_1" Save the form Verify you see the tool card listed Now, log in to the tool site again, and go to Admin > Plugins > Enrolment plugins > Publish as LTI tool > tool registration Generate a new dynamic registration URL and copy it to the clipboard. Go back to the ltiplatform site and go to Admin > Plugins > Activities > External tool > Manage tools Paste the dynamic registration URL into the text field Click "Add new LTI Advantage" Verify you're taken to a page listing the "1.1 Site level tool" as an existing tool on the same domain Click the "Update" button next to the "1.1 site level tool" entry Now, when you're taken back to the manage tools page, verify : You see a tool card for "Moodle" You don't see a tool card for "1.1 Site level tool" (it has been updated in place)
    • 1
    • Navigation push 2, Navigation push 3, Navigation push 4, Navigation push 5, Navigation push 6

      See MDL-67301, which adds support for dynamic registration to the platform side of things, in mod/lti. This issue is about implementing the tool side, allowing the Moodle tool to be registered via one action in any dynamic-registration-compliant platforms.

      The IMS spec is not yet public, however if/when it becomes available, I will link it here.

            jaked Jake Dallimore
            jaked Jake Dallimore
            Mihail Geshoski Mihail Geshoski
            Mathew May Mathew May
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 weeks, 1 hour, 54 minutes
                2w 1h 54m

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