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

Revert the disabling of the Preconfigured tool field when editing an external tool activity

XMLWordPrintable

    • MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • MDL-56564-master-2
    • Hide
      Behat
      1. Run Behat tests for @mod_lti tags.
        • Confirm that everything passes.
      Manual testing
      Setup
      1. Download and run ngrok

        ./ngrok http 80 --region=au
        

      2. Navigate to Site administration ► Plugins ► Activity modules ► External tool ► Manage tools.
      3. Enter "http://lti.tools/test/tp.php" into the Tool URL... field.
      4. Click Add
      5. On the IMS LTI Tool Provider: Tool registration emulator, click Registration.
      6. Check out the Enabled capabilities multi-select box.
        • Confirm that it contains "ContentItemSelectionRequest" under the Message types option group.
      7. Select all of the options under Enabled capabilities.
      8. Select all of the options under Tool services.
      9. Click Register tool.
      10. On the confirmation page, click Yes to activate the tool.
      11. Click on the Edit link (the cog icon) for the Test tool provider entry.
      12. Click on Show more...
      13. Under Tool configuration usage, select Show in activity chooser and as a preconfigured tool.
      14. Click Save changes
      15. Add another tool that does not support content item selection. For our purposes, use the Curiosity tool using the cartridge URL: https://www.eduappcenter.com/configurations/44yeqvafpdu8avrp.xml.
      16. Add another external tool that does not support content item selection: https://www.eduappcenter.com/configurations/7ebpoyrycqwqivxe.xml.
      Making sure that content selection still works and fields (Tool URL, Secure tool URL, Launch container, Custom parameters, Icon URL, Secure icon URL) are being reset when another preconfigured tool is selected
      1. Create a course
      2. Login as a teacher enrolled to the course
      3. Turn editing on.
      4. Click Add an activity or resource.
      5. Select Test tool provider then click Add.
      6. Enter Test tool under Activity name
      7. Click Select content
      8. On the IMS LTI tool provider emulator dialogue, click Content-Item.
      9. Select "LTI launch 3 - a link to launch a different tool provider"
      10. Select "window" value for Select return container.
      11. Click Return selection to close the dialogue.
      12. Expand all the fields and check the form.
        • Confirm that the following fields have been filled out accordingly:
          • Tool URL
          • Launch container (set to "New window")
          • Custom parameters
          • Icon URL
      13. Change the "Preconfigured tool" selection to the "Curiosity" tool.
        • Confirm that the following fields have been reset:
          • Tool URL
          • Launch container (set to "Default")
          • Custom parameters
          • Icon URL
      Editing an external tool in a course
      1. Continuing from the previous steps, select "Test tool provider
      2. Click Select content
      3. On the IMS LTI tool provider emulator dialogue, click Content-Item.
      4. Select "LTI launch 3 - a link to launch a different tool provider"
      5. Click Return selection to close the dialogue.
      6. Click "Save and return to course"
      7. Add another external tool using the "Curiosity" preconfigured tool.
      8. Add another external tool and enter a name "Moodle tool" and a Tool URL "http://www.moodle.org"
      9. Click "Save and return to course".
      10. Back on the course page, click on the "Edit" menu for the tool based from "Test tool provider".
      11. Click Edit settings and check the form.
        • Confirm that the "Select content" button is enabled.
        • Confirm that the "Preconfigured tool" field is enabled.
        • Confirm that the following fields are enabled:
          • Tool URL
          • Secure tool URL
          • Consumer key
          • Shared secret
          • Icon URL
          • Secure icon URL
      12. Go back to the course page and edit the settings for the external tool based from the Curiosity tool. Confirm that:
        • The "Select content" button is disabled.
        • The "Preconfigured tool" field is enabled and is set to "Curiosity".
        • The fields mentioned above are disabled.
      13. Go back to the course page and edit the settings for the external tool based from the "Moodle tool". Confirm that:
        • The "Select content" button is disabled.
        • The "Preconfigured tool" field is enabled and set to "Automatic, based on tool URL".
        • The fields mentioned above are enabled.
      Deleting a tool type
      1. Navigate to Site administration ► Plugins ► Activity modules ► External tool ► Manage tools.
      2. Delete the Curiosity tool type.
      3. Go back to the course and edit the external tool that was created based on "Curiosity" and check the form.
        • Confirm that "Automatic, based on tool URL" is selected for the "Preconfigured tool" field.
        • Confirm that the "Select content" button is disabled.
        • Confirm that the following fields can be edited again:
          • Tool URL
          • Secure tool URL
          • Consumer key
          • Shared secret
          • Icon URL
          • Secure icon URL
      4. Select "Test tool provider"
        • Confirm that the "Select content" button gets enabled
        • Confirm that the following fields are enabled:
          • Tool URL
          • Secure tool URL
          • Consumer key
          • Shared secret
          • Icon URL
          • Secure icon URL
      5. Select "Vimeo"
        • Confirm that the "Select content" button gets disabled
        • Confirm that the following fields are disabled:
          • Tool URL
          • Secure tool URL
          • Consumer key
          • Shared secret
          • Icon URL
          • Secure icon URL
      Show
      Behat Run Behat tests for @mod_lti tags. Confirm that everything passes. Manual testing Setup Download and run ngrok ./ngrok http 80 --region=au 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... Under Tool configuration usage , select Show in activity chooser and as a preconfigured tool . Click Save changes Add another tool that does not support content item selection. For our purposes, use the Curiosity tool using the cartridge URL: https://www.eduappcenter.com/configurations/44yeqvafpdu8avrp.xml . Add another external tool that does not support content item selection: https://www.eduappcenter.com/configurations/7ebpoyrycqwqivxe.xml . Making sure that content selection still works and fields (Tool URL, Secure tool URL, Launch container, Custom parameters, Icon URL, Secure icon URL) are being reset when another preconfigured tool is selected Create a course Login as a teacher enrolled to the course Turn editing on. Click Add an activity or resource . Select Test tool provider then click Add . Enter Test tool under Activity name Click Select content On the IMS LTI tool provider emulator dialogue, click Content-Item . Select " LTI launch 3 - a link to launch a different tool provider " Select " window " value for Select return container . Click Return selection to close the dialogue. Expand all the fields and check the form. Confirm that the following fields have been filled out accordingly: Tool URL Launch container (set to " New window ") Custom parameters Icon URL Change the " Preconfigured tool " selection to the " Curiosity " tool. Confirm that the following fields have been reset: Tool URL Launch container (set to " Default ") Custom parameters Icon URL Editing an external tool in a course Continuing from the previous steps, select " Test tool provider Click Select content On the IMS LTI tool provider emulator dialogue, click Content-Item . Select " LTI launch 3 - a link to launch a different tool provider " Click Return selection to close the dialogue. Click " Save and return to course " Add another external tool using the " Curiosity " preconfigured tool. Add another external tool and enter a name " Moodle tool " and a Tool URL " http://www.moodle.org " Click " Save and return to course ". Back on the course page, click on the "Edit" menu for the tool based from " Test tool provider ". Click Edit settings and check the form. Confirm that the " Select content " button is enabled. Confirm that the " Preconfigured tool " field is enabled. Confirm that the following fields are enabled: Tool URL Secure tool URL Consumer key Shared secret Icon URL Secure icon URL Go back to the course page and edit the settings for the external tool based from the Curiosity tool. Confirm that: The " Select content " button is disabled. The " Preconfigured tool " field is enabled and is set to "Curiosity". The fields mentioned above are disabled. Go back to the course page and edit the settings for the external tool based from the " Moodle tool ". Confirm that: The " Select content " button is disabled. The " Preconfigured tool " field is enabled and set to "Automatic, based on tool URL". The fields mentioned above are enabled. Deleting a tool type Navigate to Site administration ► Plugins ► Activity modules ► External tool ► Manage tools . Delete the Curiosity tool type. Go back to the course and edit the external tool that was created based on " Curiosity " and check the form. Confirm that " Automatic, based on tool URL " is selected for the " Preconfigured tool " field. Confirm that the " Select content " button is disabled. Confirm that the following fields can be edited again: Tool URL Secure tool URL Consumer key Shared secret Icon URL Secure icon URL Select " Test tool provider " Confirm that the " Select content " button gets enabled Confirm that the following fields are enabled: Tool URL Secure tool URL Consumer key Shared secret Icon URL Secure icon URL Select " Vimeo " Confirm that the " Select content " button gets disabled Confirm that the following fields are disabled: Tool URL Secure tool URL Consumer key Shared secret Icon URL Secure icon URL

      Since the Preconfigured tool select field is always disabled when editing an external tool. This should also be the case for the "Select content" button.
      To reproduce:

      1. -Create a course. -
      2. Turn editing on.
      3. Create an external activity.
      4. Enter a Launch/cartridge URL.
      5. Click "Save and return to course"
      6. Click on the edit menu of the external tool.
        • Select Edit settings.-
      7. Check the Select content button under Preconfigured tool.
      8. Expected
        • The button should be disabled.
      9. Actual
        • The button is not disabled.

      Since the "Select content" button was introduced into the external tool mod form, the original patch for it involved disabling of the "Preconfigured tool" selector when on edit mode, which essentially prevents an existing external tool activity from being reconfigured, unlike in the earlier versions.

      This introduced complications in terms of the logic for rendering the form elements. Now, thinking back why the Preconfigured tool selector must be disabled, we realise that we really can't come up with a good enough reason to justify this change. So perhaps it might be better to revert this.

        1. url-error-2.png
          14 kB
          Frédéric Massart
        2. url-error.png
          79 kB
          Frédéric Massart

            jpataleta Jun Pataleta
            jpataleta Jun Pataleta
            John Okely John Okely
            Dan Poltawski Dan Poltawski
            Frédéric Massart Frédéric Massart
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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