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

Simplify the creation of an LTI external tool activity in a course

    XMLWordPrintable

Details

    • MOODLE_403_STABLE
    • MDL-78916-master
    • Hide

      Setup

      1. Checkout a new site, but don't install it yet.
      2. Check out latest weekly/on-demand:

        git checkout 206c3a66e77ceb153e5b5c6af22585e819f5d124
        

      3. Now, proceed to install the site.
      4. Create a course
      5. In the course, go to "More > Exernal LTI tools"
      6. Click "Add tool"
      7. Expand the "Privacy" fieldset
      8. Now, fill out the fields as follows:
        • Tool name: "Legacy Saltire - Course level"
        • Tool URL: https://saltire.lti.app/tool
        • LTI version: LTI 1.0/1.1
        • Consumer key: jisc.ac.uk
        • Shared secret: secret
        • Default launch container: "Embed, without blocks"
        • Supports deep linking: Yes (checked)
        • Content selection URL: https://saltire.lti.app/tool
        • Share launcher's name with tool: "Delegate to teacher"
        • Share launcher's email with tool: "Delegate to teacher"
        • Accept grades from the tool: "As specified in deep linking or delegate to teacher"
      9. Click "Save changes"
      10. Click "Add tool" again
      11. Expand the "Privacy" fieldset
      12. Now, fill out the fields as follows:
        • Tool name: "Legacy Example - Course level"
        • Tool URL: https://example.com
        • LTI version: LTI 1.0/1.1
        • Default launch container: "Embed, without blocks"
        • Supports deep linking: No (unchecked)
        • Share launcher's name with tool: "Always"
        • Share launcher's email with tool: "Always"
        • Accept grades from the tool: "Always"
      13. Click "Save changes"
      14. Now, go to course home
      15. Click to add an activity or resource, selecting "Legacy Saltire - Course level" from the activity chooser
      16. Name the activity "Legacy Saltire course level instance"
      17. Click "Show more..."
      18. Expand the "Privacy" fieldset
      19. Set the following fields to these values:
        • Launch container: "New window"
        • Share launcher's name with tool: yes (checked)
        • Share launcher's email with tool: yes (checked)
        • Accept grades from the tool: no (unchecked)
      20. Save and return to the course
      21. Click to add an activity or resource, selecting "Legacy Example - Course level" from the activity chooser
      22. Name the activity "Legacy Example course level instance"
      23. Click "Show more..."
      24. Expand the "Privacy" fieldset
      25. Set the following fields to these values:
        • Launch container: "Default"
      26. Save and return to the course

      Testing legacy tool instances

      1. Checkout master:

        git checkout master

      2. Upgrade your site
      3. Go to the course
      4. Edit the activity "Legacy Saltire course level instance"
      5. Verify that:
        • Both "Content" and the "Activity name" fields are denoted as required
        • There is no tick nor a "Content selected" message next to the "Select content" button
      6. Click "Save and return to course"
      7. Verify the form validation shows an error for the "Content" field, specifically: "You need to select content for this activity. "
      8. Click the "Select content" button
      9. In the resulting modal, click "Sample content" in the page header
      10. Deselect the first checkbox and instead select the fourth which reads: "LTI launch 2 (with launch URL) - a link to launch this tool with an associated gradebook column"
      11. Scroll down and click "Return selection"
      12. When the modal closes, expand the "Grade" fieldset
      13. Verify:
        • You see a tick icon and "Content selected" next to the "Select content" button
        • You still see a validation error on the page (server side errors remain, sadly)
        • The "Accept grades from the tool" checkbox is now checked
        • You see "Grade type" is set to "Point"
        • You see "Maximum grade" is set to "50"
        • You don't see a "Privacy" fieldset
        • You don't see a "Show more..." link to expand the form fields
        • You don't see a "Launch container" field
        • You don't see a "Consumer key" field
        • You don't see a "Shared secret" field
        • You don't see a "Custom parameters" field
        • You don't see a "Icon URL" field
        • You don't see a "Secure icon URL" field
        • You don't see a "Preconfigured tool" field
        • You don't see a "Tool URL" field
        • You don't see the field "Display activity name when students access the tool" (this only applies to tools using an embedded launch mode)
        • You don't see the field "Display activity description when students access the tool" (this only applies to tools using an embedded launch mode)
      14. Click "Save and return to course"
      15. Now, click the activity "Legacy Saltire course level instance" to launch into it
      16. Verify it opens in a new window
      17. Expand the "Message parameters" section of the tool
      18. Verify you see:
        • lis_person_contact_email_primary=<YOUR ADMIN USER EMAIL ADDRESS>
        • lis_person_name_family=<ADMIN USER SURNAME>
        • lis_person_name_full=<ADMIN USER FULL NAME>
        • lis_person_name_given=<ADMIN USER GIVEN NAME>
      19. Now go back to the course home
      20. Go to "More > LTI External tools"
      21. Edit the tool "Legacy Saltire - Course level"
      22. Expand the "Privacy" section of the form
      23. Verify that:
        • Share launcher's name with tool" is set to "Delegate to teacher"
        • "Share launcher's email with tool" is set to "Delegate to teacher"
      24. Expand each of the above 2 selects
      25. Verify the option "Delegate to teacher" is disabled in each case.
      26. Select "Never" for both
      27. Click "Save changes"
      28. Edit the tool settings again
      29. Expand "Privacy"
      30. Verify:
        • Both "Share launcher's name" and "Share launcher's email" are set to "Never"
        • There is no longer a "Delegate to teacher" option
      31. Now go back to course home
      32. Click the activity "Legacy Saltire course level instance" to launch into it
      33. Note: Ignore any "Undefined array key" notices during launch. This is an existing issue relating to custom params used with this tool (and the lack of personal information triggers this in this case).
      34. Expand the "Message parameters" section of the tool
      35. Verify you DO NOT see:
        • lis_person_contact_email_primary
        • lis_person_name_family
        • lis_person_name_full
        • lis_person_name_given
      36. Go back to course home
      37. Edit the activity "Legacy Example course level instance"
      38. Verify that:
        • There is no "Content" field. I.e. no "Select content" button.
        • The "Activity name" field is denoted as required
        • You DO see the field "Display activity name when students access the tool"
        • You DO see the field "Display activity description when students access the tool"
      39. Click "Save and return to course"
      40. Click the activity "Legacy Example course level instance" to launch the tool
      41. Verify it launches in an embedded view.
      42. Open your browser's developer tools and view the "Network" tab
      43. Reload the page, to capture the requests again
      44. Now, filter the view in the dev tools to just Document or HTML and find the POST request to https://example.com
      45. Click the "Request" tab where you can see the form data being included in the request.
      46. Verify that you see the following fields included there with associated data:
        • lis_person_contact_email_primary
        • lis_person_name_family
        • lis_person_name_full
        • lis_person_name_given
      47. Go back to course home
      48. Go to "More > LTI External tools"
      49. Edit the tool "Legacy Example - course level"
      50. Expand the "Privacy" section
      51. Verify that:
        • "Share launcher's name with tool" is set to "Always"
        • "Share launcher's email with tool" is set to "Always"
        • You don't see "Delegate to teacher" in the options list for either of the above 2 fields.
      52. Go to course home
      53. Edit the settings for the activity "Legacy Example course level instance"
      54. Expand the "Grade" section
      55. Verify that:
        • "Allow Legacy Example - Course level to add grades in the gradebook" is checked
        • "Allow Legacy Example - Course level to add grades in the gradebook" can be unchecked and doing so hides all the other grade fields.

      Testing new tool instances

      1. Go to the course home
      2. Go to "More > LTI External tools"
      3. Edit the "Legacy Example - course level" tool
      4. Expand the "Privacy" fieldset
      5. Set the fields as follows:
        • Set "Accept grades from the tool to "Never"
        • Set "Default launch container" to "Embed, without blocks"
        • Set "Share launcher's email" to "Always"
        • Set "Share launcher's name " to "Always"
      6. Save the tool
      7. Go to course home
      8. Click to add an activity or resource, selecting "Legacy Example - course level" from the activity chooser
      9. Verify there is no "Grade" fieldset in the form
      10. Set the name to "New instance"
      11. Save and return to course
      12. Click "New instance" to launch the tool
      13. Verify it's launched in an embedded view
      14. Open dev tools and go to the network tab again
      15. Reload the page to capture the request again
      16. Again, find the POST to http://example.com
      17. Verify that you see the following fields included there with associated data:
        • lis_person_contact_email_primary
        • lis_person_name_family
        • lis_person_name_full
        • lis_person_name_given
      18. Now go to "More > LTI External tools"
      19. Edit the "Legacy Example - course level" tool
      20. Expand the "Privacy" section
      21. Set "Accept grades from the tool" to "As specified in deep linking or Delegate to teacher"
      22. Set "Launch container" to "new window"
      23. Go to course home
      24. Click "New instance" to launch the tool
      25. Verify the tool launches in a new window
      26. Go back to course home
      27. Edit the settings for "New instance"
      28. Verify that:
        • You can see the "Grade" fieldset now
        • "Accept grades from the tool" is NOT checked
        • Checking "Accept grades from the tool" reveals other related grade fields

      Regression test multiple content item return flow

      1. Go to course home
      2. Go to an empty section of the course or create one if needed
      3. Click "Add an activity or resource" in that section
      4. Select "Legacy Saltire - course level"
      5. Click "Select content" button
      6. In the resulting modal, click "Sample content" in the page header
      7. Leave the first checkbox selected but also select the third and fourth checkboxes
      8. Scroll down and click "Return selection"
      9. When the modal closes, Verify you see a summary of the 3 items to be created
      10. Click "Save and return to course"
      11. Verify you see 3 activity instances in that section of your course now, corresponding to the 3 items you selected.
      Show
      Setup Checkout a new site, but don't install it yet. Check out latest weekly/on-demand: git checkout 206c3a66e77ceb153e5b5c6af22585e819f5d124 Now, proceed to install the site. Create a course In the course, go to "More > Exernal LTI tools" Click "Add tool" Expand the "Privacy" fieldset Now, fill out the fields as follows: Tool name: "Legacy Saltire - Course level" Tool URL: https://saltire.lti.app/tool LTI version: LTI 1.0/1.1 Consumer key: jisc.ac.uk Shared secret: secret Default launch container: "Embed, without blocks" Supports deep linking: Yes (checked) Content selection URL: https://saltire.lti.app/tool Share launcher's name with tool: "Delegate to teacher" Share launcher's email with tool: "Delegate to teacher" Accept grades from the tool: "As specified in deep linking or delegate to teacher" Click "Save changes" Click "Add tool" again Expand the "Privacy" fieldset Now, fill out the fields as follows: Tool name: "Legacy Example - Course level" Tool URL: https://example.com LTI version: LTI 1.0/1.1 Default launch container: "Embed, without blocks" Supports deep linking: No (unchecked) Share launcher's name with tool: "Always" Share launcher's email with tool: "Always" Accept grades from the tool: "Always" Click "Save changes" Now, go to course home Click to add an activity or resource, selecting "Legacy Saltire - Course level" from the activity chooser Name the activity "Legacy Saltire course level instance" Click "Show more..." Expand the "Privacy" fieldset Set the following fields to these values: Launch container: "New window" Share launcher's name with tool: yes (checked) Share launcher's email with tool: yes (checked) Accept grades from the tool: no (unchecked) Save and return to the course Click to add an activity or resource, selecting "Legacy Example - Course level" from the activity chooser Name the activity "Legacy Example course level instance" Click "Show more..." Expand the "Privacy" fieldset Set the following fields to these values: Launch container: "Default" Save and return to the course Testing legacy tool instances Checkout master: git checkout master Upgrade your site Go to the course Edit the activity "Legacy Saltire course level instance" Verify that: Both "Content" and the "Activity name" fields are denoted as required There is no tick nor a "Content selected" message next to the "Select content" button Click "Save and return to course" Verify the form validation shows an error for the "Content" field, specifically: "You need to select content for this activity. " Click the "Select content" button In the resulting modal, click "Sample content" in the page header Deselect the first checkbox and instead select the fourth which reads: "LTI launch 2 (with launch URL) - a link to launch this tool with an associated gradebook column" Scroll down and click "Return selection" When the modal closes, expand the "Grade" fieldset Verify : You see a tick icon and "Content selected" next to the "Select content" button You still see a validation error on the page (server side errors remain, sadly) The "Accept grades from the tool" checkbox is now checked You see "Grade type" is set to "Point" You see "Maximum grade" is set to "50" You don't see a "Privacy" fieldset You don't see a "Show more..." link to expand the form fields You don't see a "Launch container" field You don't see a "Consumer key" field You don't see a "Shared secret" field You don't see a "Custom parameters" field You don't see a "Icon URL" field You don't see a "Secure icon URL" field You don't see a "Preconfigured tool" field You don't see a "Tool URL" field You don't see the field "Display activity name when students access the tool" (this only applies to tools using an embedded launch mode) You don't see the field "Display activity description when students access the tool" (this only applies to tools using an embedded launch mode) Click "Save and return to course" Now, click the activity "Legacy Saltire course level instance" to launch into it Verify it opens in a new window Expand the "Message parameters" section of the tool Verify you see: lis_person_contact_email_primary=<YOUR ADMIN USER EMAIL ADDRESS> lis_person_name_family=<ADMIN USER SURNAME> lis_person_name_full=<ADMIN USER FULL NAME> lis_person_name_given=<ADMIN USER GIVEN NAME> Now go back to the course home Go to "More > LTI External tools" Edit the tool "Legacy Saltire - Course level" Expand the "Privacy" section of the form Verify that: Share launcher's name with tool" is set to "Delegate to teacher" "Share launcher's email with tool" is set to "Delegate to teacher" Expand each of the above 2 selects Verify the option "Delegate to teacher" is disabled in each case. Select "Never" for both Click "Save changes" Edit the tool settings again Expand "Privacy" Verify : Both "Share launcher's name" and "Share launcher's email" are set to "Never" There is no longer a "Delegate to teacher" option Now go back to course home Click the activity "Legacy Saltire course level instance" to launch into it Note: Ignore any "Undefined array key" notices during launch. This is an existing issue relating to custom params used with this tool (and the lack of personal information triggers this in this case). Expand the "Message parameters" section of the tool Verify you DO NOT see: lis_person_contact_email_primary lis_person_name_family lis_person_name_full lis_person_name_given Go back to course home Edit the activity "Legacy Example course level instance" Verify that: There is no "Content" field. I.e. no "Select content" button. The "Activity name" field is denoted as required You DO see the field "Display activity name when students access the tool" You DO see the field "Display activity description when students access the tool" Click "Save and return to course" Click the activity "Legacy Example course level instance" to launch the tool Verify it launches in an embedded view. Open your browser's developer tools and view the "Network" tab Reload the page, to capture the requests again Now, filter the view in the dev tools to just Document or HTML and find the POST request to https://example.com Click the "Request" tab where you can see the form data being included in the request. Verify that you see the following fields included there with associated data: lis_person_contact_email_primary lis_person_name_family lis_person_name_full lis_person_name_given Go back to course home Go to "More > LTI External tools" Edit the tool "Legacy Example - course level" Expand the "Privacy" section Verify that: "Share launcher's name with tool" is set to "Always" "Share launcher's email with tool" is set to "Always" You don't see "Delegate to teacher" in the options list for either of the above 2 fields. Go to course home Edit the settings for the activity "Legacy Example course level instance" Expand the "Grade" section Verify that: "Allow Legacy Example - Course level to add grades in the gradebook" is checked "Allow Legacy Example - Course level to add grades in the gradebook" can be unchecked and doing so hides all the other grade fields. Testing new tool instances Go to the course home Go to "More > LTI External tools" Edit the "Legacy Example - course level" tool Expand the "Privacy" fieldset Set the fields as follows: Set "Accept grades from the tool to "Never" Set "Default launch container" to "Embed, without blocks" Set "Share launcher's email" to "Always" Set "Share launcher's name " to "Always" Save the tool Go to course home Click to add an activity or resource, selecting "Legacy Example - course level" from the activity chooser Verify there is no "Grade" fieldset in the form Set the name to "New instance" Save and return to course Click "New instance" to launch the tool Verify it's launched in an embedded view Open dev tools and go to the network tab again Reload the page to capture the request again Again, find the POST to http://example.com Verify that you see the following fields included there with associated data: lis_person_contact_email_primary lis_person_name_family lis_person_name_full lis_person_name_given Now go to "More > LTI External tools" Edit the "Legacy Example - course level" tool Expand the "Privacy" section Set "Accept grades from the tool" to "As specified in deep linking or Delegate to teacher" Set "Launch container" to "new window" Go to course home Click "New instance" to launch the tool Verify the tool launches in a new window Go back to course home Edit the settings for "New instance" Verify that: You can see the "Grade" fieldset now "Accept grades from the tool" is NOT checked Checking "Accept grades from the tool" reveals other related grade fields Regression test multiple content item return flow Go to course home Go to an empty section of the course or create one if needed Click "Add an activity or resource" in that section Select "Legacy Saltire - course level" Click "Select content" button In the resulting modal, click "Sample content" in the page header Leave the first checkbox selected but also select the third and fourth checkboxes Scroll down and click "Return selection" When the modal closes, Verify you see a summary of the 3 items to be created Click "Save and return to course" Verify you see 3 activity instances in that section of your course now, corresponding to the 3 items you selected.
    • 5
    • Team Alpha - Sprint 1 I3-2023, Team Alpha - Sprint 2 I3-2023

    Description

      The aim of this issue is to improve and simplify the process of creating an LTI external tool activity in a course for teachers. Teachers should be able to create an activity with minimal configuration once there are preconfigured tools available in the course.

      Prototype: https://www.figma.com/proto/zmMi4keFIMvlQwIrUlwuLM/LTI?page-id=102%3A8&type=design&node-id=1763-3035&viewport=3574%2C-290%2C0.13&t=wc6m6CAWgBHtMbVu-1&scaling=scale-down&starting-point-node-id=1763%3A3035&show-proto-sidebar=1

      Acceptance criteria:

      • The "Select content" form elements should only be present if the tool supports that feature.
      • The "Select content" form element should be a required field if it's present.
      • The "Display activity name..." and "Display activity description..." fields should only be shown if the tool config "Launch container" is set to embedded-type containers (embed or embed without blocks)

      Attachments

        Issue Links

          Activity

            People

              jaked Jake Dallimore
              Geshoski Mihail Geshoski
              Mihail Geshoski Mihail Geshoski
              Jun Pataleta Jun Pataleta
              Kim Jared Lucas Kim Jared Lucas
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 2 days, 1 hour, 18 minutes
                  1w 2d 1h 18m

                  Clockify

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