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

Add LTI Content Item support to mod_lti

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      Setup
      1. Download and run ngrok

        ./ngrok http 80 --region=au
        

      External tool configuration
      1. Navigate to Site administration ► Plugins ► Activity modules ► External tool ► Manage tools.
      2. Enter "http://lti.tools/test/tp.php" into the Tool URL... field.
      3. Click Add
      4. On the IMS LTI Tool Provider: Tool registration emulator, click Registration.
      5. Check out the Enabled capabilities multi-select box.
        • Confirm that it contains "ContentItemSelectionRequest" under the Message types option group.
      6. Select all of the options under Enabled capabilities.
      7. Select all of the options under Tool services.
      8. Click Register tool.
      9. On the confirmation page, click Yes to activate the tool.
      10. Click on the Edit link (the cog icon) for the Test tool provider entry.
      11. Click on Show more...
      12. Check out the Content-Item message.
        • Confirm that it is ticked.
        • Confirm that it is disabled.
      13. Under Tool configuration usage, select Show in activity chooser and as a preconfigured tool.
      14. Click Save changes
      15. Click again on the Edit link (the cog icon) for the Test tool provider entry.
      16. Click on Show more...
      17. Check out the Content-Item message.
        • Confirm that it is still ticked.
        • Confirm that it is still disabled.
      Adding an external tool to a course
      1. Create a course
      2. Login as a teacher enrolled to the course
      3. Turn editing on.
      4. Click Add an activity or resource. Take note of the section it is being added to.
      5. Select Test tool provider then click Add.
      6. Enter Test tool under Activity name
      7. Open your browser's JavaScript console.
      8. Click Select content
      9. On the IMS LTI tool provider emulator dialogue, check the Request summary
        • Confirm that it says ContentItemSelectionRequest message request is valid.
      10. Click Content-Item.
      11. Click Cancel at the bottom of the page.
        • Confirm that the dialogue closes.
        • Confirm that there are no error messages displayed.
        • Confirm that there are no JavaScript console errors after the dialogue has closed.
      12. Click again on Select content
      13. Click Content-Item.
      14. Select Bespoke item
      15. Under "Type:", select "LtiLinkItem"
      16. Enter a value for Title.
      17. Enter a value for Text.
      18. Enter a URL for URL.
      19. Enter an icon URL for Icon.
      20. For LTI custom parameters, enter values like

        a=1
        b=2
        

      21. Select a value for Select return container.
      22. Click Return selection
        • Confirm that the dialogue closes.
        • Confirm that there are no JavaScript console errors after the dialogue has closed.
      23. Expand all the fields and check the form.
        • Confirm that Activity name is the same as the value entered in Title.
        • Confirm that Activity description is the same as the value entered in Text.
        • If the URL's schema is set to https, confirm that the value should be in Secure launch URL. Otherwise, it should be in Launch/cartridge URL.
        • If the Icon's schema is set to https, confirm that the value should be in Secure icon URL. Otherwise, it should be in Icon URL.
        • Confirm that Custom parameters is the same as the value entered in LTI custom parameters.
        • Confirm that Launch container matches the selected return container. See table below:
          Select return container Launch container
          No preference Default
          frame Embed, without blocks
          iframe Embed
          window New window
      24. Click Save and return to course.
        • Confirm that Test tool was added into the course under the correct section.
      Test on other editors.
      1. Repeat the previous test with the user's default editor preference set to TinyMCE.
        • Confirm that Activity description is the same as the value entered in Text.
      2. Repeat the previous test with the user's default editor preference set to plain text area.
        • Confirm that Activity description is the same as the value entered in Text.
      Automated tests
      1. Run Behat tests for @mod_lti tags.
        • Confirm that there are no errors nor failures.
      2. Run PHP unit tests for the mod_lti_testsuite.
        • Confirm that there are no errors nor failures.
      Backup test
      1. Go to a course
      2. Add a tool of the type you created
      3. Add a bespoke item, but make sure you select ltiLink
      4. Add a title and content
      5. Back it up
      6. Restore it on another site
      7. Make sure the content you selected is still displayed (it will be among the huge dump of data, use search to find it if you can't see it.
      Show
      Setup Download and run ngrok ./ngrok http 80 --region=au External tool configuration Navigate to Site administration ► Plugins ► Activity modules ► External tool ► Manage tools . Enter " http://lti.tools/test/tp.php " into the Tool URL... field. Click Add On the IMS LTI Tool Provider: Tool registration emulator , click Registration . Check out the Enabled capabilities multi-select box. Confirm that it contains " ContentItemSelectionRequest " under the Message types option group. Select all of the options under Enabled capabilities . Select all of the options under Tool services . Click Register tool . On the confirmation page, click Yes to activate the tool. Click on the Edit link (the cog icon) for the Test tool provider entry. Click on Show more... Check out the Content-Item message . Confirm that it is ticked. Confirm that it is disabled. Under Tool configuration usage , select Show in activity chooser and as a preconfigured tool . Click Save changes Click again on the Edit link (the cog icon) for the Test tool provider entry. Click on Show more... Check out the Content-Item message . Confirm that it is still ticked. Confirm that it is still disabled. Adding an external tool to a course Create a course Login as a teacher enrolled to the course Turn editing on. Click Add an activity or resource . Take note of the section it is being added to. Select Test tool provider then click Add . Enter Test tool under Activity name Open your browser's JavaScript console. Click Select content On the IMS LTI tool provider emulator dialogue, check the Request summary Confirm that it says ContentItemSelectionRequest message request is valid. Click Content-Item . Click Cancel at the bottom of the page. Confirm that the dialogue closes. Confirm that there are no error messages displayed. Confirm that there are no JavaScript console errors after the dialogue has closed. Click again on Select content Click Content-Item . Select Bespoke item Under " Type: ", select " LtiLinkItem " Enter a value for Title . Enter a value for Text . Enter a URL for URL . Enter an icon URL for Icon . For LTI custom parameters , enter values like a=1 b=2 Select a value for Select return container . Click Return selection Confirm that the dialogue closes. Confirm that there are no JavaScript console errors after the dialogue has closed. Expand all the fields and check the form. Confirm that Activity name is the same as the value entered in Title . Confirm that Activity description is the same as the value entered in Text . If the URL 's schema is set to https , confirm that the value should be in Secure launch URL . Otherwise, it should be in Launch/cartridge URL . If the Icon 's schema is set to https , confirm that the value should be in Secure icon URL . Otherwise, it should be in Icon URL . Confirm that Custom parameters is the same as the value entered in LTI custom parameters . Confirm that Launch container matches the selected return container. See table below: Select return container Launch container No preference Default frame Embed, without blocks iframe Embed window New window Click Save and return to course . Confirm that Test tool was added into the course under the correct section. Test on other editors. Repeat the previous test with the user's default editor preference set to TinyMCE. Confirm that Activity description is the same as the value entered in Text . Repeat the previous test with the user's default editor preference set to plain text area. Confirm that Activity description is the same as the value entered in Text . Automated tests Run Behat tests for @mod_lti tags. Confirm that there are no errors nor failures. Run PHP unit tests for the mod_lti_testsuite. Confirm that there are no errors nor failures. Backup test Go to a course Add a tool of the type you created Add a bespoke item, but make sure you select ltiLink Add a title and content Back it up Restore it on another site Make sure the content you selected is still displayed (it will be among the huge dump of data, use search to find it if you can't see it.
    • Affected Branches:
      MOODLE_29_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Epic Link:
    • Pull Master Branch:
      MDL-49609-master-5

      Description

      Add support for the LTI Content-Item message to improve the workflow when adding links to external tools in courses.

      http://www.imsglobal.org/specs/lticiv1p0

        Attachments

        1. configure_item.png
          configure_item.png
          105 kB
        2. configurefromlink.png
          configurefromlink.png
          47 kB
        3. contentitem_help.png
          contentitem_help.png
          98 kB
        4. contentitem.png
          contentitem.png
          83 kB
        5. contentitemtoolregistrationsuccess.png
          contentitemtoolregistrationsuccess.png
          29 kB
        6. screenshot-1.png
          screenshot-1.png
          89 kB
        7. screenshot-2.png
          screenshot-2.png
          134 kB

          Issue Links

            Activity

              People

              • Votes:
                6 Vote for this issue
                Watchers:
                22 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/Dec/16