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

Cannot set custom launch URL when creating an external tool

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      Setup
      1. Expose your web server to the web using ngrok.

        ./ngrok http 80 --region=au
        

      2. Set the $CFG->wwwroot config value to the ngrok URL value.
      3. Login as admin
      4. Navigate to Site administration ► Plugins ► Activity modules ► External tool ► Manage tools.
      5. Enter "http://lti.tools/test/tp.php" into the Tool URL... field.
      6. Click Add
      7. On the IMS LTI Tool Provider: Tool registration emulator, click Registration.
      8. Check out the Enabled capabilities multi-select box.
        • Confirm that it contains "ContentItemSelectionRequest" under the Message types option group.
      9. Select all of the options under Enabled capabilities.
      10. Select all of the options under Tool services.
      11. Click Register tool.
      12. When prompted "Are you sure you would like to activate this tool?", click Yes.
      13. Back on the Manage tools page, enter "https://online.dr-chuck.com/sakai-api-test/tp.php"" into the Tool URL... field.
      14. Click Add
      15. In the Sakai LTI 2.0 Test Harness, click on the Continue to launch_presentation_url.
      16. When prompted "Are you sure you would like to activate this tool?", click Yes.
      17. Create a course.
      18. Add an external tool.
      19. After the Adding a new External tool page loads, the Preconfigured tool should be set to "Automatic, based on launch URL". Confirm that:
        • The "Select content" button is disabled.
        • The "Launch/cartridge URL" field and related fields (see Note below) are enabled.
      20. Change the value for the Preconfigured tool to Test tool provider (the one that supports ContentItemSelectionRequest). Confirm that:
        • The "Select content" button is enabled.
        • The "Launch/cartridge URL" field and related fields (see Note below) are enabled.
      21. Change the value for the Preconfigured tool to Sakai PHP Unit Test (the one that doesn't support ContentItemSelectionRequest). Confirm that:
        • The "Select content" button is disabled.
        • The "Launch/cartridge URL" field and related fields (see Note below) are disabled.
      Note:

      If you click Show more..., you should see that the following fields also get disabled/enabled along with the Launch/cartridge URL field:

      • Secure launch URL
      • Consumer key
      • Shared secret
      • Icon URL
      • Secure icon URL
      Behat
      1. Run Behat tests for the @mod_lti tags.
        • Confirm that there are no errors nor failures.
      2. Download and run PhantomJS.
      3. Download the attached script behat-56232.sh to your moodle root directory and execute it. It runs the Behat test for the contentitem.feature for 100 times.
        • Confirm that there are no errors nor failures.
      Show
      Setup Expose your web server to the web using ngrok . ./ngrok http 80 --region=au Set the $CFG->wwwroot config value to the ngrok URL value. Login as admin 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 . When prompted " Are you sure you would like to activate this tool? ", click Yes . Back on the Manage tools page, enter " https://online.dr-chuck.com/sakai-api-test/tp.php "" into the Tool URL... field. Click Add In the Sakai LTI 2.0 Test Harness , click on the Continue to launch_presentation_url . When prompted " Are you sure you would like to activate this tool? ", click Yes . Create a course. Add an external tool. After the Adding a new External tool page loads, the Preconfigured tool should be set to " Automatic, based on launch URL ". Confirm that: The " Select content " button is disabled. The " Launch/cartridge URL " field and related fields (see Note below) are enabled. Change the value for the Preconfigured tool to Test tool provider (the one that supports ContentItemSelectionRequest). Confirm that: The " Select content " button is enabled. The " Launch/cartridge URL " field and related fields (see Note below) are enabled. Change the value for the Preconfigured tool to Sakai PHP Unit Test (the one that doesn't support ContentItemSelectionRequest). Confirm that: The " Select content " button is disabled. The " Launch/cartridge URL " field and related fields (see Note below) are disabled. Note: If you click Show more... , you should see that the following fields also get disabled/enabled along with the Launch/cartridge URL field: Secure launch URL Consumer key Shared secret Icon URL Secure icon URL Behat Run Behat tests for the @mod_lti tags. Confirm that there are no errors nor failures. Download and run PhantomJS . Download the attached script behat-56232.sh to your moodle root directory and execute it. It runs the Behat test for the contentitem.feature for 100 times. Confirm that there are no errors nor failures.
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-56232-master

      Description

      Previously teachers can add an external tool with a launch URL of anything. Since MDL-49609 the launch URL field is now disabled.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jpataleta Jun Pataleta
              Reporter:
              johno John Okely
              Peer reviewer:
              John Okely
              Integrator:
              David Monllaó
              Tester:
              Adrian Greeve
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

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