-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.1.4, 4.2.1
-
MOODLE_401_STABLE, MOODLE_402_STABLE
- Create a fresh site so we can be sure you have no preexisting tools.
- Create and go to a course
- Click to add an activity and select "External tool"
- Click "Show more" to expand the form
- Enter the following:
- Name: My test tool
- Consumer key: CONSUMER
- Shared secret: SECRET
- Icon URL: https://tracker.moodle.org/secure/attachment/62693/Mobile-M-Icon-2-corners.png
- Secure Icon URL: https://tracker.moodle.org/secure/attachment/62693/Mobile-M-Icon-2-corners.png
- Tool URL: http://example.com
- Save
- Now, edit the instance
- Click the '+' sign next to the "Preconfigured tool" select
- Enter the name "Course tool" and the Tool URL: http://moodle.org
- Save the course tool (the popup will close and take you back to the activity instance form)
- Now, from the activity instance form, select the preconfigured tool you just created
- Save
- Edit the form again
Observe that the Tool URL is present for a split second and still refers to http://example.com - Cancel (don't save)
- 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.
- Discovered while testing
-
MDL-78597 Display course preconfigured LTI tools constantly in the activity chooser
- Closed