Show
Overview
We're going to regression test the following tool instances:
Instance which uses a domain-matched hidden site tool
Instance which uses an explicitly set site tool
Instance with completely isolated manual configuration
Instance using an existing course tool
We're also going to verify:
that a legacy course tool isn't automatically present in the activity chooser after upgrade
that a newly created tool IS automatically present in the activity chooser.
that manual instance configuration fields are not visible for tools not support content selection
that manual instance configuration fields are visible for tools supporting content selection (an existing behaviour)
Setup
We need to create 3 tool instances before upgrading, so we can test legacy data, so install a site using weekly:
On a fresh site, not yet installed.
git checkout 57ae65f514968ea4e5e66706179dbaf64ac27fcd
Install the site
Login as admin
Go to Site admin > Plugins > Activity plugins > External tool > Manage tools
Click "Configure a tool manually"
Set the form fields as follows:
Tool name: "Site tool example dot com"
Tool URL: http://example.com
Tool configuration usage: Do not show; use only when a matching tool URL is entered
Expand the Privacy fieldset
Set the following:
Share launcher's name: Always
Share launcher's email: Never
Accept grades: Delegate
Save the tool
Click "Configure a tool manually"
Set the form fields as follows:
Tool name: "Visible site tool"
Tool URL: https://something.com/
Tool configuration usage: "Show as a preconfigured tool when adding an external tool"
Expand the Privacy fieldset
Set the following:
Share launcher's name: Always
Share launcher's email: Always
Accept grades: Always
Save the tool
Create a course
Enrol a teacher t1 in the course as 'editingteacher'
In the course, click to add an activity or resource, selecting "External tool"
Set the following form fields:
Activity name: "Legacy tool, site domain match"
Tool URL: http://example.com
Tab out of the tool URL field and wait a second or two until you see "Using tool configuration: Site tool example dot com"
Expand the privacy fieldset
Confirm that the first checkbox is checked and disabled
Confirm that the second checkbox is unchecked and disabled
Confirm that the third checkbox can be checked
Check "Accept grades from the tool"
Save and return to course
Launch the activity and you should see it open example.com in an embedded view. That's all we need to do for now.
In the course, click to add an activity or resource, selecting "External tool"
Set the following form fields:
Activity name: "Legacy tool, explicit site tool"
Preconfigured tool: "Visible site tool"
Expand the privacy fieldset
Confirm that the first checkbox is checked and disabled
Confirm that the second checkbox is checked and disabled
Confirm that the third checkbox is checked and disabled
Save and return to course
Launch the activity and you should see it open something.com in an embedded view. That's all we need to do for now.
In the course, click to add an activity or resource, selecting "External tool"
Click 'Show more...'
Set the form fields as follows:
Activity name: Legacy tool manual instance config
Activity description: My legacy tool description
Secure tool URL: <empty>
Launch container: Embed
Consumer key: jisc.ac.uk
Shared secret: secret
Custom params: test=cat
Icon URL: <enter some URL to an icon>
Secure icon URL: <empty>
Preconfigured tool: Automatic, based on tool URL
Tool URL: https://saltire.lti.app/tool
Expand the 'privacy' fieldset
Set the following:
Share launcher's name: Yes
Share launcher's email: No
Accept grades: No
Save and return to course
Launch the activity and you should see it open saltire test tool in an embedded view. That's all we need to do for now.
Go to course home
Click to add an activity or resource, selecting "External tool" when prompted
Click the "+" icon next to the Preconfigured tool select
In the form that opens, set the following:
Tool name: Legacy course tool
Tool URL: http://neverssl.com
'Supports Deep linking': Yes/Checked
Content selection URL: http://neverssl.com
Click "Save changes". You should now see "Legacy course tool" selected in the "Preconfigured tool" select.
Enter the activity name "Legacy course tool instance"
Click "Save and return to course"
Launch the activity and you should see it open neverssl in an embedded view. That's all we need to do for now.
Upgrade
Now checkout master (or apply the patch if you're testing this during peer review):
git checkout master
Upgrade the site. Note: you may see deprecation notices on the screen during upgrade, this is a known issue so just ignore it here.
Testing domain-matched legacy tool instance
Login as the teacher user, t1
Go to the course
Edit the settings for the activity "Legacy tool, site domain match"
Click 'Show more...' and expand the 'Privacy' fieldset
Verify the following:
You see a notice on the page, explaining that manually configured instances are no longer supported.
The activity name and description are editable
The 3 checkboxes below the activity description are editable
Everything from Secure tool URL through Tool URL in the first section of the form is locked and cannot be edited
You see "Automatic, based on tool URL" next to the "Preconfigured tool" fieldname
You see "Default" next to the "Launch container" field name
You can see the Tool URL value 'http://example.com'
You can see the 3 privacy checkboxes, however all 3 are disabled.
The values of the privacy checkboxes, respectively are: First checkbox: Checked, Second checkbox: Unchecked, Third checkbox: Checked.
Change the activity name to "Legacy tool, site domain match EDITED"
Click "Save and display"
Verify you see http://example.com in an embedded view
Verify the activity name now includes 'EDITED'
Edit the settings again
Verify :
Preconfigured tool is still listed as "Automatic, based on tool URL"
Tool URL is still listed as 'http://example.com'
Go to course home
Launch the activity "Legacy tool, site domain match EDITED" and Verify you see it open http://example.com in an embedded view.
Testing legacy tool instance using explicitly set site tool
Login as the teacher user, t1
Go to the course
Edit the settings for the activity "Legacy tool, explicit site tool"
Click 'Show more...' and expand the 'Privacy' fieldset
Verify the following:
You don't see any notice on the page
You see the "Launch container", "Custom parameters", "Preconfigured tool" fields
Preconfigured tool is set to "Visible site tool"
You don't see "Tool URL", "Consumer key" or "Shared secret" fields
Go to course home
Launch the activity "Legacy tool, explicit site tool" and Verify you see it open https://something.com in an embedded view.
Testing manually configured legacy tool instance
Go to the course home
Edit the settings for the activity "Legacy tool manual instance config"
Click 'Show more...' and expand the 'Privacy' fieldset
Verify the following:
You see a notice on the page, explaining that manually configured instances are no longer supported.
The activity name and description are editable
The 3 checkboxes below the activity description are editable
Everything from Secure tool URL through Tool URL in the first section of the form is locked and cannot be edited
You see "Automatic, based on tool URL" next to the "Preconfigured tool" fieldname
You see "Embed" next to the "Launch container" field name
You can see the Tool URL value 'https://saltire.lti.app/tool' in the disabled field
You can see the 3 privacy checkboxes, however all 3 are disabled.
The values of the privacy checkboxes, respectively are: First checkbox: Checked, Second checkbox: Unchecked, Third checkbox: Unchecked.
You can view the information for all locked fields (you can show the password by clicking the icon next to that field)
Edit the activity name, setting it to 'Legacy tool manual instance config EDITED'
Click "Save and display"
Verify :
You see the saltire app loaded in an embedded view
The activity name now contains EDITED
Edit the activity settings again
Verify :
Preconfigured tool is still listed as "Automatic, based on tool URL"
Tool URL is still listed as 'https://saltire.lti.app/tool'
Go to course home
Launch the activity "Legacy tool manual instance config EDITED" and Verify you see it open the Saltire app in an embedded view.
Testing legacy tool instance using course tool
Go to the course home
Edit the settings of the activity "Legacy course tool instance"
Click 'Show more...' and expand the 'Privacy' fieldset
Verify :
You don't see a notice about manually configured instances
The 'Preconfigured tool' select has the selected value 'Legacy course tool'
The 'Preconfigured tool' select does NOT have an option 'Automatic, based on tool URL'
You do see fields "Consumer key", "Shared secret", "Tool URL"
None of the fields are locked
None of the privacy fields are locked
Go back to course home
Launch the activity and Verify you see it open neverssl in an embedded view.
Testing mod/lti:addcoursetool permission logic
Log in to the site as an admin
Now, go to course participants, and enrol the user m1 as a 'Manager' role
Go to "Permissions"
Set "Advanced role override" to "Manager"
Enter 'mod/lti' into the filter, to help see the mod/lti capabilities more easily.
Set 'mod/lti:addcoursetool' to 'Prohibit'
Save changes
Log out
Log in as the user m1
Go to the course
Edit the settings for the activity "Legacy tool, site domain match EDITED"
Click 'Show more...'
Verify :
You see a notice on the page, explaining that manually configured instances are no longer supported.
The activity name is editable
The activity description is editable
The 3 checkboxes below the activity description are editable
Launch container shows "Default" and is locked
Preconfigured tool shows "Automatic, based on tool URL" and is locked
Select content button is locked
You can't see fields "Consumer key" or "Shared secret"
All options under the Privacy section are locked.
Go back to course home
Launch the activity "Legacy tool, site domain match EDITED" and Verify you see it open http://example.com in an embedded view.
Go back to course home
Edit the settings for the activity "Legacy tool manual instance config EDITED"
Click 'Show more...'
Verify :
You see a notice on the page, explaining that manually configured instances are no longer supported.
The activity name is editable
The activity description is editable
The 3 checkboxes below the activity description are editable
Launch container shows "Embed" and is locked
You can't see "Tool URL" or "Preconfigured tool" fields
You can't see fields "Consumer key" or "Shared secret"
All options under the Privacy section are locked.
Go to course home
Launch the activity "Legacy tool manual instance config EDITED" and Verify you see it open the Saltire app in an embedded view.
Go back to course home
Edit the settings for the activity "Legacy course tool instance"
Click 'Show more...' and expand the 'Privacy' fieldset
Verify :
You don't see a notice about manually configured instances
The 'Preconfigured tool' select has the selected value 'Legacy course tool'
The 'Preconfigured tool' select does NOT have an option 'Automatic, based on tool URL'
You do NOT see fields "Consumer key", "Shared secret", "Tool URL"
None of the fields are locked
None of the privacy fields are locked
Go back to course home
Launch the activity and Verify you see it open neverssl in an embedded view.
Log out
Testing new course-level tools
Log in as the teacher user, t1
Go back to course home
Click to add an activity or resource
Verify :
You don't see "External tool" there any more
You don't see "Legacy course tool" there (we're not updating legacy tools' activity chooser display during upgrade)
Close the activity chooser
Go to More > LTI External tools
Add new tool with the following information:
Name: New course tool
Tool URL: http://example.net
Now go back to course home
Click to add an activity or resource
Verify you see "New course tool" listed in the activity chooser
Click "New course tool"
Enter the activity name "New course tool instance"
Note: (If you click 'Show more...' on this add instance form it will reveal a bunch of manual instance config fields - this is an existing problem and will be resolved when we add the new instance add/edit form in a future issue)
Click "Save and display"
Verify you see http://example.net launched in an embedded view.
Edit the settings of "New course tool instance"
Click 'Show more...' and expand the 'Privacy' fieldset
Verify :
You see the following fields in the first section of the form: "Activity name", "Activity description", 3 checkboxes (display ...), "Launch container", "Custom params" and "Preconfigured tool".
You don't see any other fields like Tool URL, Shared secret, etc.
The privacy options are editable
Testing 'migration' of a locked manually-configured tool instance
Go to the course home
Go to "More > LTI External tools"
Add a new tool
Enter the following form field data:
Tool name: "Course tool Saltire"
Tool URL: https://saltire.lti.app/tool
Consumer key: jisc.ac.uk
Shared secret: secret
Supports deep linking: Yes (checked)
Content selection URL: https://saltire.lti.app/tool
Save the tool
Go back to course home
Click to add an activity or resource
Select "Course tool Saltire"
Set the activity name "Course tool Saltire instance"
Click "Save and display"
Verify you see Saltire launch in an embedded view
Go back to course home
Edit the settings of the activity "Course tool Saltire instance"
Click 'Show more...'
Verify you see field "Tool URL", "Consumer key" and "Shared secret" (this confirms existing behaviour for tool instances for tools supporting content selection).
Go back to course home
Edit the settings of the activity "Legacy tool manual instance config EDITED"
Verify :
You still see a notice about manual configuration being unsupported
All configuration fields (i.e. not the activity name, description and 3 checkboxes below description) are still locked
Testing editing a course-level tool at site admin
Login as the admin
Go to "Plugins > Activity plugins > External tool > Manage tools"
Edit the course-level tool "Course tool Saltire"
Verify you don't see any "Tool configuration usage" form field. This cannot be set at site level any more for course tools.
Testing manual instance form is blocked
Visit the following URL in your site, replacing the SITE part and COURSEID part:
http://SITE/course/modedit.php?add=lti&type&course=COURSEID§ion=0&return=0&sr=0&beforemod=0
Verify you see an error "The manual creation of tools without a course tool definition is no longer supported. Please create a course tool first and then use that to create activity instances."