Show
Setup
Checkout a new site, but don't install it yet.
Check out latest weekly/on-demand:
git checkout 206c3a66e77ceb153e5b5c6af22585e819f5d124
Now, proceed to install the site.
Create a course
In the course, go to "More > Exernal LTI tools"
Click "Add tool"
Expand the "Privacy" fieldset
Now, fill out the fields as follows:
Tool name: "Legacy Saltire - Course level"
Tool URL: https://saltire.lti.app/tool
LTI version: LTI 1.0/1.1
Consumer key: jisc.ac.uk
Shared secret: secret
Default launch container: "Embed, without blocks"
Supports deep linking: Yes (checked)
Content selection URL: https://saltire.lti.app/tool
Share launcher's name with tool: "Delegate to teacher"
Share launcher's email with tool: "Delegate to teacher"
Accept grades from the tool: "As specified in deep linking or delegate to teacher"
Click "Save changes"
Click "Add tool" again
Expand the "Privacy" fieldset
Now, fill out the fields as follows:
Tool name: "Legacy Example - Course level"
Tool URL: https://example.com
LTI version: LTI 1.0/1.1
Default launch container: "Embed, without blocks"
Supports deep linking: No (unchecked)
Share launcher's name with tool: "Always"
Share launcher's email with tool: "Always"
Accept grades from the tool: "Always"
Click "Save changes"
Now, go to course home
Click to add an activity or resource, selecting "Legacy Saltire - Course level" from the activity chooser
Name the activity "Legacy Saltire course level instance"
Click "Show more..."
Expand the "Privacy" fieldset
Set the following fields to these values:
Launch container: "New window"
Share launcher's name with tool: yes (checked)
Share launcher's email with tool: yes (checked)
Accept grades from the tool: no (unchecked)
Save and return to the course
Click to add an activity or resource, selecting "Legacy Example - Course level" from the activity chooser
Name the activity "Legacy Example course level instance"
Click "Show more..."
Expand the "Privacy" fieldset
Set the following fields to these values:
Launch container: "Default"
Save and return to the course
Testing legacy tool instances
Checkout master:
git checkout master
Upgrade your site
Go to the course
Edit the activity "Legacy Saltire course level instance"
Verify that:
Both "Content" and the "Activity name" fields are denoted as required
There is no tick nor a "Content selected" message next to the "Select content" button
Click "Save and return to course"
Verify the form validation shows an error for the "Content" field, specifically: "You need to select content for this activity. "
Click the "Select content" button
In the resulting modal, click "Sample content" in the page header
Deselect the first checkbox and instead select the fourth which reads: "LTI launch 2 (with launch URL) - a link to launch this tool with an associated gradebook column"
Scroll down and click "Return selection"
When the modal closes, expand the "Grade" fieldset
Verify :
You see a tick icon and "Content selected" next to the "Select content" button
You still see a validation error on the page (server side errors remain, sadly)
The "Accept grades from the tool" checkbox is now checked
You see "Grade type" is set to "Point"
You see "Maximum grade" is set to "50"
You don't see a "Privacy" fieldset
You don't see a "Show more..." link to expand the form fields
You don't see a "Launch container" field
You don't see a "Consumer key" field
You don't see a "Shared secret" field
You don't see a "Custom parameters" field
You don't see a "Icon URL" field
You don't see a "Secure icon URL" field
You don't see a "Preconfigured tool" field
You don't see a "Tool URL" field
You don't see the field "Display activity name when students access the tool" (this only applies to tools using an embedded launch mode)
You don't see the field "Display activity description when students access the tool" (this only applies to tools using an embedded launch mode)
Click "Save and return to course"
Now, click the activity "Legacy Saltire course level instance" to launch into it
Verify it opens in a new window
Expand the "Message parameters" section of the tool
Verify you see:
lis_person_contact_email_primary=<YOUR ADMIN USER EMAIL ADDRESS>
lis_person_name_family=<ADMIN USER SURNAME>
lis_person_name_full=<ADMIN USER FULL NAME>
lis_person_name_given=<ADMIN USER GIVEN NAME>
Now go back to the course home
Go to "More > LTI External tools"
Edit the tool "Legacy Saltire - Course level"
Expand the "Privacy" section of the form
Verify that:
Share launcher's name with tool" is set to "Delegate to teacher"
"Share launcher's email with tool" is set to "Delegate to teacher"
Expand each of the above 2 selects
Verify the option "Delegate to teacher" is disabled in each case.
Select "Never" for both
Click "Save changes"
Edit the tool settings again
Expand "Privacy"
Verify :
Both "Share launcher's name" and "Share launcher's email" are set to "Never"
There is no longer a "Delegate to teacher" option
Now go back to course home
Click the activity "Legacy Saltire course level instance" to launch into it
Note: Ignore any "Undefined array key" notices during launch. This is an existing issue relating to custom params used with this tool (and the lack of personal information triggers this in this case).
Expand the "Message parameters" section of the tool
Verify you DO NOT see:
lis_person_contact_email_primary
lis_person_name_family
lis_person_name_full
lis_person_name_given
Go back to course home
Edit the activity "Legacy Example course level instance"
Verify that:
There is no "Content" field. I.e. no "Select content" button.
The "Activity name" field is denoted as required
You DO see the field "Display activity name when students access the tool"
You DO see the field "Display activity description when students access the tool"
Click "Save and return to course"
Click the activity "Legacy Example course level instance" to launch the tool
Verify it launches in an embedded view.
Open your browser's developer tools and view the "Network" tab
Reload the page, to capture the requests again
Now, filter the view in the dev tools to just Document or HTML and find the POST request to https://example.com
Click the "Request" tab where you can see the form data being included in the request.
Verify that you see the following fields included there with associated data:
lis_person_contact_email_primary
lis_person_name_family
lis_person_name_full
lis_person_name_given
Go back to course home
Go to "More > LTI External tools"
Edit the tool "Legacy Example - course level"
Expand the "Privacy" section
Verify that:
"Share launcher's name with tool" is set to "Always"
"Share launcher's email with tool" is set to "Always"
You don't see "Delegate to teacher" in the options list for either of the above 2 fields.
Go to course home
Edit the settings for the activity "Legacy Example course level instance"
Expand the "Grade" section
Verify that:
"Allow Legacy Example - Course level to add grades in the gradebook" is checked
"Allow Legacy Example - Course level to add grades in the gradebook" can be unchecked and doing so hides all the other grade fields.
Testing new tool instances
Go to the course home
Go to "More > LTI External tools"
Edit the "Legacy Example - course level" tool
Expand the "Privacy" fieldset
Set the fields as follows:
Set "Accept grades from the tool to "Never"
Set "Default launch container" to "Embed, without blocks"
Set "Share launcher's email" to "Always"
Set "Share launcher's name " to "Always"
Save the tool
Go to course home
Click to add an activity or resource, selecting "Legacy Example - course level" from the activity chooser
Verify there is no "Grade" fieldset in the form
Set the name to "New instance"
Save and return to course
Click "New instance" to launch the tool
Verify it's launched in an embedded view
Open dev tools and go to the network tab again
Reload the page to capture the request again
Again, find the POST to http://example.com
Verify that you see the following fields included there with associated data:
lis_person_contact_email_primary
lis_person_name_family
lis_person_name_full
lis_person_name_given
Now go to "More > LTI External tools"
Edit the "Legacy Example - course level" tool
Expand the "Privacy" section
Set "Accept grades from the tool" to "As specified in deep linking or Delegate to teacher"
Set "Launch container" to "new window"
Go to course home
Click "New instance" to launch the tool
Verify the tool launches in a new window
Go back to course home
Edit the settings for "New instance"
Verify that:
You can see the "Grade" fieldset now
"Accept grades from the tool" is NOT checked
Checking "Accept grades from the tool" reveals other related grade fields
Regression test multiple content item return flow
Go to course home
Go to an empty section of the course or create one if needed
Click "Add an activity or resource" in that section
Select "Legacy Saltire - course level"
Click "Select content" button
In the resulting modal, click "Sample content" in the page header
Leave the first checkbox selected but also select the third and fourth checkboxes
Scroll down and click "Return selection"
When the modal closes, Verify you see a summary of the 3 items to be created
Click "Save and return to course"
Verify you see 3 activity instances in that section of your course now, corresponding to the 3 items you selected.