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

Instance data not properly removed when editing a manual tool instance and selecting a type

XMLWordPrintable

    • MOODLE_401_STABLE, MOODLE_402_STABLE

      1. Create a fresh site so we can be sure you have no preexisting tools.
      2. Create and go to a course
      3. Click to add an activity and select "External tool"
      4. Click "Show more" to expand the form
      5. Enter the following:
      6. Save
      7. Now, edit the instance
      8. Click the '+' sign next to the "Preconfigured tool" select
      9. Enter the name "Course tool" and the Tool URL: http://moodle.org
      10. Save the course tool (the popup will close and take you back to the activity instance form)
      11. Now, from the activity instance form, select the preconfigured tool you just created
      12. Save
      13. Edit the form again
        Observe that the Tool URL is present for a split second and still refers to http://example.com
      14. Cancel (don't save)
      15. Launch the activity
        Expected: You launch into http://moodle.org
        Actual: You see the content from http://example.com launched

      This is because the manual instance of lti isn't properly cleared when a tool type is selected for use. When we do this, we should clear a bunch of instance data that is now being handled by the tool type.

      What we expect in such a case, is that the DB state is exactly the same as if the tool instance were created using a preconfigured tool in the first place. If I create a new instance, select a preconfigured tool, then save, any data which is empty should also be empty when I edit a manual instance and select a preconfigured tool. The relevant fields which should be emptied (and their corresponding DB column name).

      • Tool URL (toolurl)
      • Consumer key (resourcekey)
      • Secret (password)
      • Icon url (icon)
      • Secure icon url (secureicon)

      Note: We need to be careful not to remove the manual config data if the tool is using a typeid that corresponds to a domain-matched site-level tool. In those cases, though a typeid is set, we treat the tool instance as being manual configuration in nature.

            jaked Jake Dallimore
            jaked Jake Dallimore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

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