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

Update tool to support 1.3 OAuth2/OIDC launch flow

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MDL-69543-master
    • Hide

      Prerequisites

      1. Create two Moodle sites running on localhost - one designated 'platform', one 'tool'.
      2. In both sites, go to admin settings and clear all values from the 'curlsecurityblockedhosts' admin setting and save.
      3. In the platform site, create a course called "Platform course 1", with:
        • 5 Students: s1, s2, s3, s4, s5
        • 2 Teachers: t1 and t2
      4. In the tool site, create a course called "Tool course 1", with:
        • An assignment called "Assign 1" with a max grade of 80.
        • An assignment called "Assign 2" with default settings
        • A file resource (representing a non-graded activity)
        • A single teacher, t1, enrolled.
      5. In the tool site, create a course called "Tool course 2", with:
        • A single teacher t2 enrolled
      6. In the tool site admin settings:
        • Enable enrol_lti and auth_lti plugins
        • Enable "Allow frame embedding"

      Registration

      1. On the tool site, go to Admin > Plugins > Enrolments > Publish as LTI tool > Tool registration
      2. Verify you see two sections: "Registration endpoints" and "Registered platforms"
      3. Click the "Manual registration" tab under the "Registration endpoints" sectio
      4. Keep this page open, we'll need it shortly.
      5. On the platform site, go to 'Admin > Plugins > Activity modules > External tool > Manage tools'
      6. Click 'Configure a tool manually'
      7. Enter the following values:
        • In "Name" enter "Moodle LTI Advantage Tool"
        • In 'Tool URL', paste the value copied from "Tool URL" in the tool.
        • Set 'LTI Version' to 1.3
        • Set 'Public key type' to 'Keyset URL'
        • In 'Public keyset' paste the value copied from"JWKS URL" in the tool
        • In 'Initiate login URL', paste the value copied from "Initiate login URL" in the tool
        • In 'Redirection URI(s)' paste the value copied from BOTH "Tool URL" and "Deep linking URL" rows in the tool. Make sure each is on its own line.
        • Set "Tool configuration usage" to "Show in activity chooser and as a preconfigured tool"
        • Check 'Supports deep linking'
        • In 'Content selection URL', paste the value copied from "Deep linking URL" in the tool
        • Under "Services" set "IMS LTI Assignment and Grade Services" to "Use this service for grade sync and column management"
        • Under "Services" set "IMS LTI Names and Role Provisioning" to "Use this service to retrieve members' information as per privacy settings"
        • Set tools settings to "Do not use this service"
        • Save the tool (you'll be taken to the manage tools page again)
      8. For the tool you just created, click "View configuration details"
      9. Copy these configuration details somewhere, or be ready to access them again.
      10. Now, switch back to the tool site
      11. Under "Registered platforms" click "Register a platform"
      12. Enter the following values:
        • Set "Platform name" to 'Moodle platform'
        • In "Platform Id (Issuer)" paste the value you copied from the "Platform ID" field in the configuration details
        • In "Client ID" paste the value you copied from the "Client ID" field in the configuration details
        • In "Authentication request URL" paste the value you copied from "Authentication request URL" in the configuration details
        • In "Public keyset URL" paste the value you copied from "Public keyset URL" in the configuration details
        • In "Access token URL" paste the value you copied from "Access token URL" in the configuration details
      13. Save changes
      14. Verify:
        • You now see an entry in the Tool site's "Registered Platforms" table.
        • There are no deployments listed under the "Deployments" column of this table.
        • You can see 3 actions: "Edit", "Manage deployments" and "Delete"
      15. Click "Manage deployments"
      16. Click "Add a deployment"
      17. Set the following values:
        • In "Name" enter "Site wide deployment"
        • In "Deployment Id" paste the value you copied from "Deployment Id" in the the configuration details
      18. Save the deployment
      19. Verify:
        • You see one entry in the "Manage deployments" table
        • The only action available is "Delete".
      20. This concludes the registration portion of the testing.

      Simple deep link launch

      1. Log out of both the platform and tool sites completely
      2. In the platform site, login at the user t1
      3. Go to the "Platform course 1" course
      4. Click to add a new activity, selecting "Moodle LTI Advantage Tool"
      5. When the edit page loads, click the "Select content" button
      6. Verify you're asked to link your tool account.
      7. Open a new tab and sign in to the tool site as the teacher 't1'
      8. In the original tab, close the modal and click "Select content" again.
      9. Proceed to link your account by clicking the "Link this account" button.
      10. Verify you see "No resources or activities are published yet" in the resulting modal pane. We'll need to publish some resources first.
      11. Go to the tool site's course 'Tool course 1'.
      12. From the menu, select "Published as LTI Tools"
      13. Verify:
        • You see a page with 2 tabs: "LTI Advantage" and "Legacy LTI (1.1/2.0" and that "LTI Advantage" is selected by default
        • There is a blue info notification saying "No resources or activities are published yet"
      14. Click the "Legacy LTI" tab
      15. Verify:
        • You see a yellow warning notification saying the 1.1/.2.0 tools are now deprecated.
        • You see a blue info notice stating "No tools provided"
      16. Go back to the "LTI Advantage" tab
      17. Click "Add"
      18. Verify "LTI Version" is set to "LTI Advantage" by default
      19. Enter the following values:
        • Set "Tool to be published" to "Assign 1"
      20. Save
      21. Verify:
        • You're taken back to the "LTI Advantage" tab
        • You now see an entry in the table
        • You can see 'Launch URL' and 'Custom properties' in the "Launch details" column
        • Custom properties is set to something like 'id=some-uuid-value-here'
        • Clicking each field's input in the "Launch details" column selects that whole value, ready for copying to clipboard.
      22. Now, go back to the platform site
      23. Again, click "Select content"
      24. Verify:
        • You are not asked to log in this time (you should still be signed in from the last time)
        • You can see the assignment listed under its parent course.
        • You can see both "Add to course" and "Add to gradebook" check boxes next to "Assign 1"
        • You DO NOT see any checkboxes for the course row itself
      25. Check the "Add to course" checkbox
      26. Verify the "Add to gradebook" checkbox is automatically checked
      27. Uncheck the "Add to course" checkbox
      28. Verify the "Add to gradebook" checkbox is automatically unchecked
      29. Check the "Add to Gradebook" checkbox
      30. Verify the "Add to course" checkbox is automatically checked
      31. Uncheck the "Add to gradebook" checkbox
      32. Verify the "Add to course" checkbox IS NOT unchecked this time.
      33. Make sure no check boxes are selected and submit the form
      34. Verify that the modal closes and no errors are seen
      35. Click "Select content" again
      36. Make sure both checkboxes for "Assign 1" are checked this time
      37. Submit the form
      38. Verify you see (you may need to click "Show more" to see this option):
        • That the mod edit form has been updated, with name set to "Assign 1" now
        • That 'Custom parameters' contains a value like 'id=some-uuid-value-here'
        • That the grade has been set to "Point" with "Maxgrade" set to 80, as per the resource's settings in the tool
        • That under "Privacy", "Accept grades from the tool" is checked.
      39. Under privacy, check "Share names with the tool" and "Share emails with the tool"
      40. Make sure "Launch container" is set to "Embed"
      41. Click "Save and return to course"

      Simple resource link launch

      1. Open up a new incognito session and sign in to the tool site as an admin user
      2. Go to the course participants view in this session.
      3. Now go back to your platform site session and log in as the teacher t1 (if not already)
      4. Click the activity "Assign 1" which you just created in the deep linking launch section of the testing above.
      5. Verify:
        • You can see the assignment in the tool site, as an embedded iframe in your platform site.
        • You can see a navigation bar for the tool site in the iframe (i.e. Embedding is not forced yet)
      6. In the incognito tab, reload the participants page
      7. Verify you see a single user 't1' present in that course. I.e. the teacher's existing account has been found and used.
      8. In the normal platform session, log out of the t1 account
      9. Log in as the student s1
      10. Launch the resource "Assign 1"
      11. Verify:
        • You can see the assignment in the tool site, as an embedded iframe in your platform site.
        • You DO NOT see the nav drawer or nav as part of this view.
      12. In the incognito tab, reload the participants page
      13. Verify you see a new user there, complete with email, firstname and surname. Check these details match those of s1 in the platform site.
      14. As the student, complete the assignment (submit a file)
      15. Log out of the platform site.
      16. Log in as the teacher
      17. Launch the "Assign 1" resource again from the platform course
      18. Verify that you now see "Participants: 1" in the assign summary, since the student launched into the resource.
      19. Click "View all submissions" and confirm that you see a list containing the student

      Force embedded layout custom property

      1. Continuing on from the "Simple resource link launch" steps from above...
      2. As the teacher in the platform course, edit the activity "Assign 1"
      3. Click "Show more" and under "Custom parameters" as "force_embed=true" on a new line of its own
      4. Save
      5. Launch the resource
      6. Verify that you no longer see the navigation drawer or page headers in the embedded tool site. I.e. force_embed is working as expected.
      7. Edit the activity, remove that custom property and save.

      Access control during content selection

      1. Log out of the tool site.
      2. Log in to the platform as user t2
      3. Access the course "Platform course 1"
      4. Click to add new activity and select "Moodle LTI Advantage Tool"
      5. When the edit page loads, click "Select content"
      6. Verify you're asked to link your tool account.
      7. Open a new tab and sign in to the tool site as the teacher 't2'
      8. In the original tab, close the modal and click "Select content" again.
      9. Proceed to link your account by clicking the "Link this account" button.
      10. Verify you see no published content
      11. Log out of the user t2 in the tool site
      12. Log into the tool site as the admin user
      13. Enrol t2 into "Tool course 1" as teacher
      14. Log out of the tool site
      15. In the platform site, press "Select content" again
      16. Verify you now see the published content from "Tool course 1"
      17. As admin user, remove user t2 from the tool course "Tool course 1".

      Manual sharing of resources (and creation of resource links)

      1. Log out of all users in the tool site
      2. Log in as teacher t1 in "Tool course 1"
      3. Click "Published as LTI Tools" in the course administration
      4. Note the Launch URL and Custom Properties of "Assign 1". Write these down and pretend you emailed these details to another platform user, t2.
      5. Log out of the tool site.
      6. Log in to the platform site as user t2
      7. Go to the course "Platform course 1"
      8. Click to add an activity, selecting "Moodle LTI Advantage Tool"
      9. When the edit page loads, press "Select content"
      10. Verify you see "No resources or activities are published yet" in the resulting modal pane. This just verifies that user t2 does not have access to the published resource in "Tool course 1" via content selection.
      11. Close the modal
      12. Click "Show more"
      13. Enter the Launch URL from the earlier step into the "Tool URL" field
      14. Enter the Custom properties value from the earlier step into "Custom parameters"
      15. Save
      16. Launch the activity and Verify
        • You can see the assignment in the tool site, as an embedded iframe in your platform site.
      17. Log out of both the platform and tool sites.
      18. Log in to the tool site as an admin user
      19. Go to "Test course 1"
      20. Go to "Participants"
      21. Verify you see the user t2 listed with 'No roles'. This user has only been enrolled in the course. All roles will have been assigned at module context, so we'll confirm that next.
      22. Go back to course home and click "Assign 1"
      23. Go to "Locally assigned roles" in the module settings ('More' menu)
      24. Verify you see user t2 listed with the role of teacher.
      25. Log out of both the platform and the tool.

      Missing tool deployment

      1. As admin, in the tool site, remove the deployment '1' via 'Admin > Plugins > Enrolments > Tool Registration > Manage deployments'
      2. As the teacher 't1' in the platform, try both content selection and resource link (activity) launches
      3. Verify both fail with an exception "Unable to find deployment"
      4. Add the deployment '1' back (you can name it anything)
      5. As the teacher 't1' in the platform, try both content selection and resource link (activity) launches
      6. Verify both now work as before

      Course sharing

      1. Sign in as the teacher 't1' in the tool
      2. Go to the tool site's course "Tool course 1"
      3. From the menu, select "Published as LTI Tools"
      4. Click "Add"
      5. Enter the following values:
        • Set "Tool to be published" to "Course"
      6. Save.
      7. Log out of the tool.
      8. Log in to the platform site as user t1
      9. Go to the course "Platform course 1"
      10. Click to create a new resource/activity
      11. Select "Moodle LTI Advantage Tool"
      12. Click "Select content"
      13. Verify:
        • You see checkboxes next to the course "Tool Course 1" for both "Add to course" and "Add to gradebook"
        • You still see checkboxes next to "Assign 1" too.
      14. Make sure both checkboxes for "Tool course 1" are selected and click "Add content"
      15. Submit the form
      16. Verify you see (you may need to click "Show more" to see this option):
        • That the mod edit form has been updated, with name set to "Tool Course 1" now
        • That  "Launch container" is set to "Embed"
        • That 'Custom parameters' contains a value like 'id=some-uuid-value-here'
        • That under "Privacy", "Accept grades from the tool" is checked.
        • That the grade has been set to "Point" with "Maxgrade" set to 180 - the summation of "Assign 1" (80 points) and "Assign 2" (100 points).
      17. Under privacy, check "Share names with the tool" and "Share emails with the tool"
      18. Click "Save and return to course"
      19. Verify you see a validation error saying that 180 exceeds the maximum grade value for a resource in the platform (this may not be the case in all platforms but since grade values are sent as a percentage, this won't matter)
      20. Set the grade to 100 and save the activity.
      21. Now, launch the activity you just created.
      22. Verify:
        • You see the course load in an iframe
        • You see the drawer and navigation
      23. Click "Assign 2"
      24. Verify you can view it without any warning/error.
      25. Now go to course home
      26. Launch the shared module activity "Assign 1"
      27. Log out of the tool and platform
      28. Log in to the platform as a student s1
      29. Go to "Platform course 1"
      30. Launch the activity "Assign 1"
      31. Go back to course home
      32. Launch the activity "Tool Course 1"
      33. Verify:
        • You see the course load in an iframe
        • You don't see the drawer and navigation
      34. Click "Assign 2"
      35. Verify you can view it without any warning/error.
      36. Log in to the tool site as the teacher t1
      37. Verify:
        • You see the same 2 entries in the participants page for the teacher (t1) and student (s1)
        • That each row (t1, s1) has 2 enrolment methods listed - one for the shared course and one for the shared activity.
      38. Now, go to "Published as LTI tools"
      39. Delete the "Tool Course 1" enrolment method
      40. Confirm the action
      41. Go to the participants page again
      42. Verify:
        • That there are still 2 people listsed: t1 and s1
        • That each row (t1, s1) for the platform users has only one enrolment method listed now - for the "Assign 1" activity.
      43. Log out of the tool and platform.

      Non-graded activities

      1. Log in to the tool site as t1
      2. Go to the course "Tool course 1"
      3. Go to "Published as LTI Tools"
      4. Add new
      5. Select the file resource
      6. Save
      7. In the platform, log in as the teacher t1
      8. Go to the platform course "Platform Course 1"
      9. Click to add an activity/resource
      10. Select "Moodle LTI Advantage Tool"
      11. Click "Select content"
      12. Verify:
        • You see the file resource listed under the course "Tool Course 1"
        • The file resource has only a single checkbox "Add to course". There is no checkbox for "Add to gradebook"
      13. Select the file resource checkbox
      14. Click "Add content"
      15. Verify you see (you may need to click "Show more" to see this option):
        • That the mod edit form has been updated, with name set to the name of the file resource
        • That 'Custom parameters' contains a value like 'id=some-uuid-value-here'
        • That the grade options have been hidden from the form entirely
        • That under "Privacy", "Accept grades from the tool" is not checked.
      16. Under privacy, check "Share names with the tool" and "Share emails with the tool"
      17. Make sure "Launch container" is set to "Embed"
      18. Click "Save and return to course"
      19. Launch the resource by clicking the activity you just created
      20. Verify you can see the file
      21. Check the course gradebook
      22. Verify there is no grade column for this activity.
      23. Log out of both tool and platform.

      Hiding published resources

      1. Log in to the tool site as t1
      2. Go to the course "Tool course 1"
      3. Go to "Published as LTI Tools"
      4. Next to the "Assign 1" published resource, click the eye to hide it.
      5. In the platform, log in as the teacher t1
      6. Go to the course "Platform Course 1"
      7. Launch the activity that points to the "Assign 1" resource
      8. Verify you see an error saying the resource is unavailable or does not exist.
      9. In the tool, unhide the resource
      10. Launch again in the platform
      11. Verify the launch works without any error.
      12. Log out of the platform and the tool.

      Backup and restore

      1. Log into the tool as the admin user
      2. Go to the course "Tool course 1"
      3. Backup the course
      4. From course settings, select "Restore"
      5. Proceed to restore the course into a new course - name it something like "RESTORE"
      6. Once restored, open the RESTORE course
      7. View the "Published as LTI tools" page
      8. Edit the "Assign 1" published resource
      9. Check the custom properties value of id
      10. Verify this is different to the id of the published "Assign 1" in "Tool course 1"

      Privacy settings

      1. Log in to the platform as teacher t1
      2. Go to course "Platform Course 1"
      3. Edit the settings for the activity "Assign 1"
      4. Uncheck both "Share emails with the tool" and "Share names with the tool"
      5. Save
      6. Launch "Assign 1"
      7. Log out of the platform
      8. Log in to the platform as user s1
      9. Go the the course "Platform course 1"
      10. Launch "Assign 1"
      11. Log out of the tool and the platform
      12. Log into the tool site as teacher t1
      13. View the course participants page
      14. Verify you see:
        • a user with numeric firstname/surname values and an email that resembles "enrol_lti_eadc1234..@example.com"
        • the user t1, with proper firstname, surname and email (this confirms the preexisting accounts are not updated with platform details on launch)
      15. Log out of the tool site
      16. Log in to the platform site as user t1
      17. Go to the course "Platform course 1"
      18. Edit the activity settings again for "Assign 1"
      19. Check both "Share emails with the tool" and "Share names with the tool" and save.
      20. Log out of the platform.
      21. Log in to the platform as user s1
      22. Go to "Platform course 1"
      23. Launch the activity "Assign 1"
      24. Log out
      25. Log in to the tool site as the user t1 now
      26. Go to "Tool course 1"
      27. Go to "Participants"
      28. Verify:
        • You don't see that pseudo-anonymous entry any more
        • You see an enrolment entry for the teacher t1
        • You see an enrolment entry for the platform user s1 and this time the firstname, surname and email are all correct (non-numerical and match those values in the platform user's profile).

      Legacy tool publication

      1. Go to the tool site and create a new course
      2. In that course, create an assignment
      3. Go to course admin > Published as LTI tools
      4. Click 'Add'
      5. Change version to "Legacy LTI (1.1/2.0).."
      6. Set "Custom instance name" to "Legacy LTI assignment"
      7. Select the assignment under "Tool to be published"
      8. Click "Add method"
      9. Go to the "Legacy LTI" tab
      10. Verify you see the method listed.
      11. Verify you see the following under the "Launch details" column:
        • Cartridge URL
        • Secret
        • Launch URL
      12. Verify you see a "Registration URL" column and that there is data in that column (should look like enrol/lti/proxy.php)
      13. Edit the method and Verify the LTI Version is set on "Legacy LTI" still
      14. Change this method to "LTI advantage" and save
      15. Go to the "LTI Advantage" tab (should already be here)
      16. Verify you see the method listed with only "Launch URL" and "Custom properties" listed in the "Launch details" column of the table.
      17. Verify that in custom properties you see a value for 'id'. I.e. confirm you see the string 'id=xxxxxxx-xxxx-xxxxx-xxxxxxx'
      Show
      Prerequisites Create two Moodle sites running on localhost - one designated 'platform', one 'tool'. In both sites, go to admin settings and clear all values from the 'curlsecurityblockedhosts' admin setting and save. In the platform site, create a course called "Platform course 1", with: 5 Students: s1, s2, s3, s4, s5 2 Teachers: t1 and t2 In the tool site, create a course called "Tool course 1", with: An assignment called "Assign 1" with a max grade of 80. An assignment called "Assign 2" with default settings A file resource (representing a non-graded activity) A single teacher, t1, enrolled. In the tool site, create a course called "Tool course 2", with: A single teacher t2 enrolled In the tool site admin settings: Enable enrol_lti and auth_lti plugins Enable "Allow frame embedding" Registration On the tool site, go to Admin > Plugins > Enrolments > Publish as LTI tool > Tool registration Verify you see two sections: "Registration endpoints" and "Registered platforms" Click the "Manual registration" tab under the "Registration endpoints" sectio Keep this page open, we'll need it shortly. On the platform site, go to 'Admin > Plugins > Activity modules > External tool > Manage tools' Click 'Configure a tool manually' Enter the following values: In "Name" enter "Moodle LTI Advantage Tool" In 'Tool URL', paste the value copied from "Tool URL" in the tool. Set 'LTI Version' to 1.3 Set 'Public key type' to 'Keyset URL' In 'Public keyset' paste the value copied from"JWKS URL" in the tool In 'Initiate login URL', paste the value copied from "Initiate login URL" in the tool In 'Redirection URI(s)' paste the value copied from BOTH "Tool URL" and "Deep linking URL" rows in the tool. Make sure each is on its own line. Set "Tool configuration usage" to "Show in activity chooser and as a preconfigured tool" Check 'Supports deep linking' In 'Content selection URL', paste the value copied from "Deep linking URL" in the tool Under "Services" set "IMS LTI Assignment and Grade Services" to "Use this service for grade sync and column management" Under "Services" set "IMS LTI Names and Role Provisioning" to "Use this service to retrieve members' information as per privacy settings" Set tools settings to "Do not use this service" Save the tool (you'll be taken to the manage tools page again) For the tool you just created, click "View configuration details" Copy these configuration details somewhere, or be ready to access them again. Now, switch back to the tool site Under "Registered platforms" click "Register a platform" Enter the following values: Set "Platform name" to 'Moodle platform' In "Platform Id (Issuer)" paste the value you copied from the "Platform ID" field in the configuration details In "Client ID" paste the value you copied from the "Client ID" field in the configuration details In "Authentication request URL" paste the value you copied from "Authentication request URL" in the configuration details In "Public keyset URL" paste the value you copied from "Public keyset URL" in the configuration details In "Access token URL" paste the value you copied from "Access token URL" in the configuration details Save changes Verify : You now see an entry in the Tool site's "Registered Platforms" table. There are no deployments listed under the "Deployments" column of this table. You can see 3 actions: "Edit", "Manage deployments" and "Delete" Click "Manage deployments" Click "Add a deployment" Set the following values: In "Name" enter "Site wide deployment" In "Deployment Id" paste the value you copied from "Deployment Id" in the the configuration details Save the deployment Verify : You see one entry in the "Manage deployments" table The only action available is "Delete". This concludes the registration portion of the testing. Simple deep link launch Log out of both the platform and tool sites completely In the platform site, login at the user t1 Go to the "Platform course 1" course Click to add a new activity, selecting "Moodle LTI Advantage Tool" When the edit page loads, click the "Select content" button 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. Verify you see "No resources or activities are published yet" in the resulting modal pane. We'll need to publish some resources first. Go to the tool site's course 'Tool course 1'. From the menu, select "Published as LTI Tools" Verify : You see a page with 2 tabs: "LTI Advantage" and "Legacy LTI (1.1/2.0" and that "LTI Advantage" is selected by default There is a blue info notification saying "No resources or activities are published yet" Click the "Legacy LTI" tab Verify : You see a yellow warning notification saying the 1.1/.2.0 tools are now deprecated. You see a blue info notice stating "No tools provided" Go back to the "LTI Advantage" tab Click "Add" Verify "LTI Version" is set to "LTI Advantage" by default Enter the following values: Set "Tool to be published" to "Assign 1" Save Verify : You're taken back to the "LTI Advantage" tab You now see an entry in the table You can see 'Launch URL' and 'Custom properties' in the "Launch details" column Custom properties is set to something like 'id=some-uuid-value-here' Clicking each field's input in the "Launch details" column selects that whole value, ready for copying to clipboard. Now, go back to the platform site Again, click "Select content" Verify : You are not asked to log in this time (you should still be signed in from the last time) You can see the assignment listed under its parent course. You can see both "Add to course" and "Add to gradebook" check boxes next to "Assign 1" You DO NOT see any checkboxes for the course row itself Check the "Add to course" checkbox Verify the "Add to gradebook" checkbox is automatically checked Uncheck the "Add to course" checkbox Verify the "Add to gradebook" checkbox is automatically unchecked Check the "Add to Gradebook" checkbox Verify the "Add to course" checkbox is automatically checked Uncheck the "Add to gradebook" checkbox Verify the "Add to course" checkbox IS NOT unchecked this time. Make sure no check boxes are selected and submit the form Verify that the modal closes and no errors are seen Click "Select content" again Make sure both checkboxes for "Assign 1" are checked this time Submit the form Verify you see (you may need to click "Show more" to see this option): That the mod edit form has been updated, with name set to "Assign 1" now That 'Custom parameters' contains a value like 'id=some-uuid-value-here' That the grade has been set to "Point" with "Maxgrade" set to 80, as per the resource's settings in the tool That under "Privacy", "Accept grades from the tool" is checked. Under privacy, check "Share names with the tool" and "Share emails with the tool" Make sure "Launch container" is set to "Embed" Click "Save and return to course" Simple resource link launch Open up a new incognito session and sign in to the tool site as an admin user Go to the course participants view in this session. Now go back to your platform site session and log in as the teacher t1 (if not already) Click the activity "Assign 1" which you just created in the deep linking launch section of the testing above. Verify : You can see the assignment in the tool site, as an embedded iframe in your platform site. You can see a navigation bar for the tool site in the iframe (i.e. Embedding is not forced yet) In the incognito tab, reload the participants page Verify you see a single user 't1' present in that course. I.e. the teacher's existing account has been found and used. In the normal platform session, log out of the t1 account Log in as the student s1 Launch the resource "Assign 1" Verify: You can see the assignment in the tool site, as an embedded iframe in your platform site. You DO NOT see the nav drawer or nav as part of this view. In the incognito tab, reload the participants page Verify you see a new user there, complete with email, firstname and surname. Check these details match those of s1 in the platform site. As the student, complete the assignment (submit a file) Log out of the platform site. Log in as the teacher Launch the "Assign 1" resource again from the platform course Verify that you now see "Participants: 1" in the assign summary, since the student launched into the resource. Click "View all submissions" and confirm that you see a list containing the student Force embedded layout custom property Continuing on from the "Simple resource link launch" steps from above... As the teacher in the platform course, edit the activity "Assign 1" Click "Show more" and under "Custom parameters" as "force_embed=true" on a new line of its own Save Launch the resource Verify that you no longer see the navigation drawer or page headers in the embedded tool site. I.e. force_embed is working as expected. Edit the activity, remove that custom property and save. Access control during content selection Log out of the tool site. Log in to the platform as user t2 Access the course "Platform course 1" Click to add new activity and select "Moodle LTI Advantage Tool" When the edit page loads, 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 't2' In the original tab, close the modal and click "Select content" again. Proceed to link your account by clicking the "Link this account" button. Verify you see no published content Log out of the user t2 in the tool site Log into the tool site as the admin user Enrol t2 into "Tool course 1" as teacher Log out of the tool site In the platform site, press "Select content" again Verify you now see the published content from "Tool course 1" As admin user, remove user t2 from the tool course "Tool course 1". Manual sharing of resources (and creation of resource links) Log out of all users in the tool site Log in as teacher t1 in "Tool course 1" Click "Published as LTI Tools" in the course administration Note the Launch URL and Custom Properties of "Assign 1". Write these down and pretend you emailed these details to another platform user, t2. Log out of the tool site. Log in to the platform site as user t2 Go to the course "Platform course 1" Click to add an activity, selecting "Moodle LTI Advantage Tool" When the edit page loads, press "Select content" Verify you see "No resources or activities are published yet" in the resulting modal pane. This just verifies that user t2 does not have access to the published resource in "Tool course 1" via content selection. Close the modal Click "Show more" Enter the Launch URL from the earlier step into the "Tool URL" field Enter the Custom properties value from the earlier step into "Custom parameters" Save Launch the activity and Verify You can see the assignment in the tool site, as an embedded iframe in your platform site. Log out of both the platform and tool sites. Log in to the tool site as an admin user Go to "Test course 1" Go to "Participants" Verify you see the user t2 listed with 'No roles'. This user has only been enrolled in the course. All roles will have been assigned at module context, so we'll confirm that next. Go back to course home and click "Assign 1" Go to "Locally assigned roles" in the module settings ('More' menu) Verify you see user t2 listed with the role of teacher. Log out of both the platform and the tool. Missing tool deployment As admin, in the tool site, remove the deployment '1' via 'Admin > Plugins > Enrolments > Tool Registration > Manage deployments' As the teacher 't1' in the platform, try both content selection and resource link (activity) launches Verify both fail with an exception "Unable to find deployment" Add the deployment '1' back (you can name it anything) As the teacher 't1' in the platform, try both content selection and resource link (activity) launches Verify both now work as before Course sharing Sign in as the teacher 't1' in the tool Go to the tool site's course "Tool course 1" From the menu, select "Published as LTI Tools" Click "Add" Enter the following values: Set "Tool to be published" to "Course" Save. Log out of the tool. Log in to the platform site as user t1 Go to the course "Platform course 1" Click to create a new resource/activity Select "Moodle LTI Advantage Tool" Click "Select content" Verify : You see checkboxes next to the course "Tool Course 1" for both "Add to course" and "Add to gradebook" You still see checkboxes next to "Assign 1" too. Make sure both checkboxes for "Tool course 1" are selected and click "Add content" Submit the form Verify you see (you may need to click "Show more" to see this option): That the mod edit form has been updated, with name set to "Tool Course 1" now That  "Launch container" is set to "Embed" That 'Custom parameters' contains a value like 'id=some-uuid-value-here' That under "Privacy", "Accept grades from the tool" is checked. That the grade has been set to "Point" with "Maxgrade" set to 180 - the summation of "Assign 1" (80 points) and "Assign 2" (100 points). Under privacy, check "Share names with the tool" and "Share emails with the tool" Click "Save and return to course" Verify you see a validation error saying that 180 exceeds the maximum grade value for a resource in the platform (this may not be the case in all platforms but since grade values are sent as a percentage, this won't matter) Set the grade to 100 and save the activity. Now, launch the activity you just created. Verify : You see the course load in an iframe You see the drawer and navigation Click "Assign 2" Verify you can view it without any warning/error. Now go to course home Launch the shared module activity "Assign 1" Log out of the tool and platform Log in to the platform as a student s1 Go to "Platform course 1" Launch the activity "Assign 1" Go back to course home Launch the activity "Tool Course 1" Verify : You see the course load in an iframe You don't see the drawer and navigation Click "Assign 2" Verify you can view it without any warning/error. Log in to the tool site as the teacher t1 Verify : You see the same 2 entries in the participants page for the teacher (t1) and student (s1) That each row (t1, s1) has 2 enrolment methods listed - one for the shared course and one for the shared activity. Now, go to "Published as LTI tools" Delete the "Tool Course 1" enrolment method Confirm the action Go to the participants page again Verify : That there are still 2 people listsed: t1 and s1 That each row (t1, s1) for the platform users has only one enrolment method listed now - for the "Assign 1" activity. Log out of the tool and platform. Non-graded activities Log in to the tool site as t1 Go to the course "Tool course 1" Go to "Published as LTI Tools" Add new Select the file resource Save In the platform, log in as the teacher t1 Go to the platform course "Platform Course 1" Click to add an activity/resource Select "Moodle LTI Advantage Tool" Click "Select content" Verify : You see the file resource listed under the course "Tool Course 1" The file resource has only a single checkbox "Add to course". There is no checkbox for "Add to gradebook" Select the file resource checkbox Click "Add content" Verify you see (you may need to click "Show more" to see this option): That the mod edit form has been updated, with name set to the name of the file resource That 'Custom parameters' contains a value like 'id=some-uuid-value-here' That the grade options have been hidden from the form entirely That under "Privacy", "Accept grades from the tool" is not checked. Under privacy, check "Share names with the tool" and "Share emails with the tool" Make sure "Launch container" is set to "Embed" Click "Save and return to course" Launch the resource by clicking the activity you just created Verify you can see the file Check the course gradebook Verify there is no grade column for this activity. Log out of both tool and platform. Hiding published resources Log in to the tool site as t1 Go to the course "Tool course 1" Go to "Published as LTI Tools" Next to the "Assign 1" published resource, click the eye to hide it. In the platform, log in as the teacher t1 Go to the course "Platform Course 1" Launch the activity that points to the "Assign 1" resource Verify you see an error saying the resource is unavailable or does not exist. In the tool, unhide the resource Launch again in the platform Verify the launch works without any error. Log out of the platform and the tool. Backup and restore Log into the tool as the admin user Go to the course "Tool course 1" Backup the course From course settings, select "Restore" Proceed to restore the course into a new course - name it something like "RESTORE" Once restored, open the RESTORE course View the "Published as LTI tools" page Edit the "Assign 1" published resource Check the custom properties value of id Verify this is different to the id of the published "Assign 1" in "Tool course 1" Privacy settings Log in to the platform as teacher t1 Go to course "Platform Course 1" Edit the settings for the activity "Assign 1" Uncheck both "Share emails with the tool" and "Share names with the tool" Save Launch "Assign 1" Log out of the platform Log in to the platform as user s1 Go the the course "Platform course 1" Launch "Assign 1" Log out of the tool and the platform Log into the tool site as teacher t1 View the course participants page Verify you see: a user with numeric firstname/surname values and an email that resembles "enrol_lti_eadc1234..@example.com" the user t1, with proper firstname, surname and email (this confirms the preexisting accounts are not updated with platform details on launch) Log out of the tool site Log in to the platform site as user t1 Go to the course "Platform course 1" Edit the activity settings again for "Assign 1" Check both "Share emails with the tool" and "Share names with the tool" and save. Log out of the platform. Log in to the platform as user s1 Go to "Platform course 1" Launch the activity "Assign 1" Log out Log in to the tool site as the user t1 now Go to "Tool course 1" Go to "Participants" Verify : You don't see that pseudo-anonymous entry any more You see an enrolment entry for the teacher t1 You see an enrolment entry for the platform user s1 and this time the firstname, surname and email are all correct (non-numerical and match those values in the platform user's profile). Legacy tool publication Go to the tool site and create a new course In that course, create an assignment Go to course admin > Published as LTI tools Click 'Add' Change version to "Legacy LTI (1.1/2.0).." Set "Custom instance name" to "Legacy LTI assignment" Select the assignment under "Tool to be published" Click "Add method" Go to the "Legacy LTI" tab Verify you see the method listed. Verify you see the following under the "Launch details" column: Cartridge URL Secret Launch URL Verify you see a "Registration URL" column and that there is data in that column (should look like enrol/lti/proxy.php) Edit the method and Verify the LTI Version is set on "Legacy LTI" still Change this method to "LTI advantage" and save Go to the "LTI Advantage" tab (should already be here) Verify you see the method listed with only "Launch URL" and "Custom properties" listed in the "Launch details" column of the table. Verify that in custom properties you see a value for 'id'. I.e. confirm you see the string 'id=xxxxxxx-xxxx-xxxxx-xxxxxxx'
    • 3
    • 4.0 holding pattern 5, 4.0 holding pattern 12, 4.0 Navigation blitz, 4.0 Navigation blitz 2, 4.0 Navigation blitz 3, QA blitz

      Per the specs:

      https://www.imsglobal.org/spec/lti/v1p3#tool-deployment-0
      http://www.imsglobal.org/spec/security/v1p0/#step-1-third-party-initiated-login

      Reference library from IMS (requires php7.3 iirc)
      https://github.com/IMSGlobal/lti-1-3-php-library

       

      This will involve adding several new fields to store relevant platform information in the tool as well as to store keys needed for the auth flow. Dynamic registration does not need to be supported at this time as support is not present in core's platform implementation yet.

      At the end of this work, we should be able to launch a tool via the OIDC third party initiated login flow and provide basic user information to the tool via JWT.
      This issue deals with primarily the auth flow. Another issue will be created to deal with user enrolments/auth of the specific user launching the tool (MDL-69547)

      Some work has been done on this, so this will be about formalising that solution and working through any blockers.

            jaked Jake Dallimore
            jaked Jake Dallimore
            Mihail Geshoski Mihail Geshoski
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 8 weeks, 4 days, 3 hours, 40 minutes
                8w 4d 3h 40m

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