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

Provide upgrade path for 1.1 preconfigured tools

XMLWordPrintable

    • MOODLE_400_STABLE
    • MDL-71371-master
    • Hide

      Prerequisites

      1. You need two moodle sites (localhost is fine) - one called 'platform' and one called 'tool'
      2. For BOTH sites, go to admin and remove all entries from "curlsecurityblockedhosts", saving the setting.
      3. The platform site should contain a course with:
        • A teacher t1
        • A few students (s1, s2)
      4. The tool site should contain a course with:
        • A teacher t1
        • An assignment (using defaults is fine)
        • A file resource (anything is fine)
      5. In the tool site admin settings:
        • Enable enrol_lti and auth_lti plugins
        • Enable "Allow frame embedding"

      Coexistence

      This test confirms that we're able to register a tool site over LTI Advantage and launch into resources and activities over BOTH LTI 1.1 and LTI Advantage - aka the new and old tools can coexist. This is the preferred method of setting up LTI Advantage with Moodle consumers (i.e. Moodle to Moodle), since Moodle platforms use a single deployment model, and thus don't suit the consumer key based upgrade path very well.

      1. First we want to set up a 1.1 tool and launch it. In the tool site, go to a course
      2. Under 'Participants' > 'Enrolment methods' select 'Publish as LTI tool' from the "Add method" list
        1. Change the LTI version to "Legacy LTI"
        2. Enter an instance name
        3. Select an activity to be published (assignment is fine)
        4. Leave everything else on defaults
        5. Save
      3. Access "Published as LTI tools" via the course admin and under the "Legacy LTI" tab, note the "Launch URL" and "Secret" (leave this tab open)
      4. Now, in another browser session log in to the platform site.
      5. Go to a course
      6. Click to add an activity or resource, selecting "External tool" when prompted.
        1. In the "Tool URL" field, enter the tool's Launch URL you noted before.
        2. Click the "Show more" link.
        3. In the "Shared secret" field, enter the tool's Secret you noted before.
        4. For "Consumer Key", enter "MOODLE_CONSUMER".
        5. Check the privacy section of the form and make sure "Share launcher's name with the tool" and "Share launchers email with the tool" are both checked
        6. Save and display
      7. Verify you are launched into the assignment.
      8. Now, time to set up the LTI Advantage tool registration. We'll use dynamic registration for this. First, log out of both the tool and the platform.
      9. Go to the tool site and log in as an admin user.
      10. Go to Site admin > Plugins > Enrolments > Publish as LTI tool > Tool registration
      11. Click "Generate registration URL"
      12. Copy this value to the clipboard using the "copy to clipboard" control
      13. Now, log into the platform site as an admin
      14. Go to Site admin > Plugins > Activity modules > External tool > Manage tools
      15. Paste the dynamic registration URL from your clipboard into the URL field you see on that page
      16. Click "Add LTI Advantage"
      17. If prompted, click "Register as a new external tool" (button at the bottom)
      18. When the process completes and you're back on the manage tools page, edit the pending tool registration you just created
      19. Rename it to "Moodle LTI Advantage Tool", set "Tool configuration usage" to "Show in activity chooser and as a preconfigured tool" and save.
      20. When the page reloads and the tool card is seen below, click "Activate" to activate the tool registration
      21. Now, log out of both the tool and the platform.
      22. Log in to the platform as the user t1
      23. Now, go to the platform course and click to add an activity
      24. Select "Moodle LTI Advantage Tool" from the preconfigured tools
        1. Click "Select content"
        2. Verify you're asked to link your tool account.
        3. Open a new tab and sign in to the tool site as the teacher 't1'
        4. In the original tab, close the modal and click "Select content" again.
        5. Proceed to link your account by clicking the "Link this account" button.
        6. Click continue
        7. Verify you see a modal with the text "Published Content: No resources or activities are published yet"
      25. Now, go back to the tool site, and publish an activity over LTI Advantage (Published as LTI tools > Add)
        1. Select the file resource
        2. Save.
      26. Repeat the "Select content" action in the platform site now
        1. Verify you see the file resource shared over LTI Advantage.
        2. Select the file resource and click the "Add content" button.
        3. Check the privacy section of the form and make sure "Share launcher's name with the tool" and "Share launchers email with the tool" are both checked
        4. Save the external tool edit form and return to course.
      27. Click to view the external file resource you just created
      28. Verify you can launch into the file
      29. Try launching the LTI 1.1 assignment again
      30. Verify that still works too
      31. Now log out of the platform
      32. Log in to the platform as the student 's1'
      33. Launch the 1.1 assignment and again verify you're taken into the assignment
      34. Launch the 1.3 file resource and again verify you're taken into the file
      35. Log out of the tool and platform sites.
      36. Log in to the tool site as t1
      37. Go to the course and view participants
      38. Verify you see two different rows for user s1, each having its own enrolment method. This effectively confirms that the user launching the assignment over 1.1 is being identified as a different user to the user launching the file resource over 1.3.

      Consumer key based migration (covered by phpunit so no testing required)

      This test confirms that staff are able to migrate a tool deployment from 1.1 to 1.3, under certain circumstances, allowing existing users of a resource/activity to continue to access content and see their grades. This usually requires that the instance of the tool on 1.1 is represented the same way in LTI 1.3. E.g. If the tool instance is a deployment within a course in 1.1, the tool deployment should also be a course level deployment in 1.3. Since this isn't the case in Moodle (Moodle's platform side is a single deployment model), this is tricky to test nicely with Moodle, but we'll do our best to simulate what would happen under a best-case scenario with other platforms that do support multiple deployments.

      1. In the platform site, go to "Plugins > External tool > Manage tools" and edit the preconfigured tool entry in site admin
        1. Select "This is an upgraded legacy tool" checkbox
        2. Verify you see two new fields appear - consumer key and shared secret
        3. Enter the consumer key from the 1.1 tool deployment into consumer key. MOODLE_CONSUMER
        4. Copy the secret from the 1.1 published tool on the tool site (in the course, under Course settings -> Publish as LTI Tools -> Legacy LTI) and paste it into the shared secret field
        5. Save.
      2. This LTI Advantage tool is now set up to simulate a migration of a user from 1.1 -> 1.3 for that single deployment. Migration only takes place the first time tools launch for a given user, so we'll need to use a new user for this. To migrate a user we'll need to launch into a resource that has existing users in 1.1, over 1.3. Log in to the tool site as admin
      3. Go to the course and publish the assignment again, this time over LTI 1.3
      4. Log out
      5. Log in to the platform site as the teacher
      6. Click to add a new activity to the course, selecting 'Moodle LTI Advantage Tool' when prompted
        1. Click "Select content"
        2. Login as teacher t1
        3. Select the assignment, with grades, and click the "Add content" button
      7. In Privacy, make sure "Share names with the tool" and "Share email with the tool" are both checked
      8. Save the edit form and return to course
      9. Log out
      10. Log in to the platform as student s2.
      11. Launch the 1.1 assignment activity.
      12. Verify you're taken into the assignment (this sets up the legacy data for the assignment for user s2)
      13. Now, launch the 1.3 assignment activity
      14. Verify you're taken into the assignment
      15. Now, log in to the tool site as the teacher or admin
      16. Go to the course
      17. Go to the participants
      18. Verify:
        • You see user s2 listed only once
        • You see two enrolment methods against user s2 - one for the LTI 1.1 enrolment method and one for the LTI 1.3 enrolment method.
      Show
      Prerequisites You need two moodle sites (localhost is fine) - one called 'platform' and one called 'tool' For BOTH sites, go to admin and remove all entries from "curlsecurityblockedhosts", saving the setting. The platform site should contain a course with: A teacher t1 A few students (s1, s2) The tool site should contain a course with: A teacher t1 An assignment (using defaults is fine) A file resource (anything is fine) In the tool site admin settings: Enable enrol_lti and auth_lti plugins Enable "Allow frame embedding" Coexistence This test confirms that we're able to register a tool site over LTI Advantage and launch into resources and activities over BOTH LTI 1.1 and LTI Advantage - aka the new and old tools can coexist. This is the preferred method of setting up LTI Advantage with Moodle consumers (i.e. Moodle to Moodle), since Moodle platforms use a single deployment model, and thus don't suit the consumer key based upgrade path very well. First we want to set up a 1.1 tool and launch it. In the tool site, go to a course Under 'Participants' > 'Enrolment methods' select 'Publish as LTI tool' from the "Add method" list Change the LTI version to "Legacy LTI" Enter an instance name Select an activity to be published (assignment is fine) Leave everything else on defaults Save Access "Published as LTI tools" via the course admin and under the "Legacy LTI" tab, note the "Launch URL" and "Secret" (leave this tab open) Now, in another browser session log in to the platform site. Go to a course Click to add an activity or resource, selecting "External tool" when prompted. In the "Tool URL" field, enter the tool's Launch URL you noted before. Click the "Show more" link. In the "Shared secret" field, enter the tool's Secret you noted before. For "Consumer Key", enter "MOODLE_CONSUMER". Check the privacy section of the form and make sure "Share launcher's name with the tool" and "Share launchers email with the tool" are both checked Save and display Verify you are launched into the assignment. Now, time to set up the LTI Advantage tool registration. We'll use dynamic registration for this. First, log out of both the tool and the platform. Go to the tool site and log in as an admin user. Go to Site admin > Plugins > Enrolments > Publish as LTI tool > Tool registration Click "Generate registration URL" Copy this value to the clipboard using the "copy to clipboard" control Now, log into the platform site as an admin Go to Site admin > Plugins > Activity modules > External tool > Manage tools Paste the dynamic registration URL from your clipboard into the URL field you see on that page Click "Add LTI Advantage" If prompted, click "Register as a new external tool" (button at the bottom) When the process completes and you're back on the manage tools page, edit the pending tool registration you just created Rename it to "Moodle LTI Advantage Tool", set "Tool configuration usage" to "Show in activity chooser and as a preconfigured tool" and save. When the page reloads and the tool card is seen below, click "Activate" to activate the tool registration Now, log out of both the tool and the platform. Log in to the platform as the user t1 Now, go to the platform course and click to add an activity Select "Moodle LTI Advantage Tool" from the preconfigured tools Click "Select content" Verify you're asked to link your tool account. Open a new tab and sign in to the tool site as the teacher 't1' In the original tab, close the modal and click "Select content" again. Proceed to link your account by clicking the "Link this account" button. Click continue Verify you see a modal with the text "Published Content: No resources or activities are published yet" Now, go back to the tool site, and publish an activity over LTI Advantage (Published as LTI tools > Add) Select the file resource Save. Repeat the "Select content" action in the platform site now Verify you see the file resource shared over LTI Advantage. Select the file resource and click the "Add content" button. Check the privacy section of the form and make sure "Share launcher's name with the tool" and "Share launchers email with the tool" are both checked Save the external tool edit form and return to course. Click to view the external file resource you just created Verify you can launch into the file Try launching the LTI 1.1 assignment again Verify that still works too Now log out of the platform Log in to the platform as the student 's1' Launch the 1.1 assignment and again  verify you're taken into the assignment Launch the 1.3 file resource and again  verify you're taken into the file Log out of the tool and platform sites. Log in to the tool site as t1 Go to the course and view participants Verify you see two different rows for user s1, each having its own enrolment method. This effectively confirms that the user launching the assignment over 1.1 is being identified as a different user to the user launching the file resource over 1.3. Consumer key based migration (covered by phpunit so no testing required) This test confirms that staff are able to migrate a tool deployment from 1.1 to 1.3, under certain circumstances, allowing existing users of a resource/activity to continue to access content and see their grades. This usually requires that the instance of the tool on 1.1 is represented the same way in LTI 1.3. E.g. If the tool instance is a deployment within a course in 1.1, the tool deployment should also be a course level deployment in 1.3. Since this isn't the case in Moodle (Moodle's platform side is a single deployment model), this is tricky to test nicely with Moodle, but we'll do our best to simulate what would happen under a best-case scenario with other platforms that do support multiple deployments. In the platform site, go to "Plugins > External tool > Manage tools" and edit the preconfigured tool entry in site admin Select "This is an upgraded legacy tool" checkbox Verify you see two new fields appear - consumer key and shared secret Enter the consumer key from the 1.1 tool deployment into consumer key. MOODLE_CONSUMER Copy the secret from the 1.1 published tool on the tool site (in the course, under Course settings -> Publish as LTI Tools -> Legacy LTI) and paste it into the shared secret field Save. This LTI Advantage tool is now set up to simulate a migration of a user from 1.1 -> 1.3 for that single deployment. Migration only takes place the first time tools launch for a given user, so we'll need to use a new user for this. To migrate a user we'll need to launch into a resource that has existing users in 1.1, over 1.3. Log in to the tool site as admin Go to the course and publish the assignment again, this time over LTI 1.3 Log out Log in to the platform site as the teacher Click to add a new activity to the course, selecting 'Moodle LTI Advantage Tool' when prompted Click "Select content" Login as teacher t1 Select the assignment, with grades, and click the "Add content" button In Privacy, make sure "Share names with the tool" and "Share email with the tool" are both checked Save the edit form and return to course Log out Log in to the platform as student s2. Launch the 1.1 assignment activity. Verify you're taken into the assignment (this sets up the legacy data for the assignment for user s2) Now, launch the 1.3 assignment activity Verify you're taken into the assignment Now, log in to the tool site as the teacher or admin Go to the course Go to the participants Verify : You see user s2 listed only once You see two enrolment methods against user s2 - one for the LTI 1.1 enrolment method and one for the LTI 1.3 enrolment method.
    • 3
    • QA blitz, Navigation push ahead, Navigation push 2, Navigation push 3, Navigation push 4, Navigation push 5, Navigation push 6

      This deals with adding support, if possible, for the 1.1 migration claim described here:

      https://www.imsglobal.org/spec/lti/v1p3/migr#lti-1-1-migration-claim

      This should allow us to have continuity for users who have already used a tool/resource over 1.1, as we can now map their original user (created based on consumer) after verification of the consumer details in the migration claim.

      Note that this will include work for both platform (to make sure Moodle sends the claim in upgraded tools) and tool (to process it).

      https://www.imsglobal.org/lti-platform-migration-specifics

            jaked Jake Dallimore
            jaked Jake Dallimore
            Mihail Geshoski Mihail Geshoski
            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 - 5 weeks, 3 days, 1 hour, 2 minutes
                5w 3d 1h 2m

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