Show
LTI 1.3 Deep-linking
Create two Moodle sites running on localhost - one designated 'platform', one 'tool'.
In both sites, go to admin settings and clear all values from the 'curlsecurityblockedhosts' admin setting and save.
In the platform site, create a course called "Platform course" and enrol a teacher.
In the tool site, create a course called "Tool course", with:
An assignment called "Assign 1" with a max grade of 80.
An assignment called "Assign 2" using the default settings.
A file resource (representing a non-graded activity).
A teacher enrolled.
In the tool site admin settings:
Enable enrol_lti and auth_lti plugins.
Enable "Allow frame embedding".
On the tool site, go to Admin > Plugins > Enrolments > Publish as LTI tool > Tool registration.
Click 'Register a platform', enter a name for the platform and click "Continue".
Once the platform is registered, keep this page with the registration details open; we'll need it shortly.
On the platform site, go to 'Admin > General > LTI > Manage tools'.
In the 'Add tool' section, paste the dynamic registration URL from the registration details on the tool site and click 'Add LTI Advantage'.
Once the tool is created, click on 'Activate'.
Now, go to the 'Platform course' course and select 'LTI external tools' from the secondary navigation.
Enable 'Show in activity chooser' for the tool.
Log out of both the platform and tool sites completely.
On the platform site, log in as the teacher.
Go to the "Platform course" course.
Click to add a new activity, selecting the Tool.
When the edit page loads, click the "Select content" button.
You should be asked to link your tool account.
Proceed to link your account by clicking the "Link this account" button.
Verify you see "No resources or activities are published yet" in the modal. (We'll need to publish some resources first)
Go to the tool site's course 'Tool course'.
From the menu, select "Published as LTI Tools"
In the "LTI Advantage" tab, click "Add".
Enter the following values:
Set "Tool to be published" to "Assign 1".
Save.
Repeat steps 22-25, and this time publish 'Assign 2' and the file resource.
Now, go back to the platform site and again, click "Select content".
Verify :
You can see 'Assign 1', 'Assign 2', and the file resource listed under its parent course.
You can see both "Add to course" and "Add to gradebook" checkboxes next to "Assign 1" and "Assign 2".
You can only see the "Add to course" checkbox for the file resource.
You DO NOT see any checkboxes for the course row itself.
Make sure no checkboxes are selected and click "Add content".
Verify that the modal closes and no errors are shown.
Click "Select content" again.
Make sure both checkboxes for "Assign 1" are checked this time
Click "Add content".
Verify you see (you may need to click "Show more" to see this option):
The mod edit form has been updated, with the name set to "Assign 1" now
That 'Custom parameters' contains a value like 'id=some-uuid-value-here'
The grade has been set to "Point" with "Maxgrade" set to 80, as per the resource's settings in the tool
That 'Allow {tool} to add grades in the gradebook' is checked.
Click "Save and return to course"
Verify that the "Assign 1" activity has been successfully added to the "Platform course" course
Open the "Assign 1" activity.
Verify you can see the assignment from the tool site as an embedded iframe on your platform site.
Go to the settings page of "Assign 1" activity
Verify that there is an indicator that the content is already selected.
Click "Select content"
Make sure both checkboxes for "Assign 2" are checked this time
Click "Add content"
Verify you see (you may need to click "Show more" to see this option):
The mod edit form has been updated, with the name set to "Assign 2" now.
That 'Custom parameters' contains a value like 'id=some-uuid-value-here'
The grade has been set to "Point" with "Maxgrade" set to 100, as per the resource's settings in the tool
That 'Allow {tool} to add grades in the gradebook is checked.
Click "Save and return to course".
Verify that the "Assign 2" activity has been successfully added to the "Platform course" course
Open the "Assign 2" activity.
Verify you can see the assignment in the tool site as an embedded iframe on your platform site.
Now go back to the "Platform course" and add a new Tool activity.
Click "Select content".
Make sure both checkboxes for "Assign 1" are checked and the "Add to course" checkbox for the file resource
Click "Add content".
Verify you see a page that shows a list of items ("Assign 1" and the file resource) that will be added to the course.
Click "Save and return to course".
Verify:
Both "Assign 1" and the file resources have been added to the course.
Both are displayed as an embedded iframe in your platform site.
The relevant settings have been preserved (e.g Grade settings for the assignment)
LTI 1.0/1.1 Deep-linking (proceed from the previous test)
For testing purposes, we could use the saLTIre testing system for LTI.
Log in as an admin.
On the platform site, go to 'Admin > General > LTI > Manage tools'.
In the 'Add tool' section, click on 'configure a tool manually'.
On the tool configuration page, set:
'Tool name' = 'LTI 1.0 tool'
'Tool URL' = ' https://saltire.lti.app/tool '
'LTI version' = 'LTI 1.0/1.1'
'Consumer key' = 'jisc.ac.uk'
'Shared secret' = 'secret'
Enable 'Supports Deep Linking (Content-Item Message)'
Save the changes to create the new tool and then verify that the tool has been created and activated.
Now, go to the 'Platform course' course and select 'LTI external tools' from the secondary navigation.
Enable 'Show in activity chooser' for the newly created 'LTI 1.0 tool'.
Now log in as a teacher on the platform site.
Go to the "Platform course" course.
Click to add a new activity, selecting the 'LTI 1.0 tool'.
When the edit page loads, click the "Select content" button.
Verify that you can see the interface provided through the saLTIre tool in the content selection modal.
Click on 'Sample content' from the top menu.
Then check 'LTI launch - a link to launch this tool' (make sure you don't check any other options).
Scroll down and press 'Return selection'.
Verify that the modal closes and no errors are shown.
Verify you see (you may need to click "Show more" to see this option):
An indication that content has been selected.
The mod edit form has been updated, with the name set to "LTI 1.1 tool" now
That 'Custom parameters' contains values like 'Person.name.fufullname=$ll', etc.
That 'Allow {tool} to add grades in the gradebook' is unchecked, and there are no other grade options available.
Change the name of the activity to 'LTI 1.1 tool resource - non-gradable'.
Click "Save and return to course"
Verify that the "LTI 1.1 tool resource - non-gradable" activity has been successfully added to the "Platform course" course.
Open the "LTI 1.1 tool resource - non-gradable" activity.
Verify you can see the saLTIre tool as an embedded iframe on your platform site.
Create a new LTI 1.1 tool activity by repeating the same steps (10-13).
This time, check 'LTI launch 2 - a link to launch this tool with an associated gradebook column' (make sure you don't check any other options)
Scroll down and press 'Return selection'.
Verify you see (you may need to click "Show more" to see this option):
An indication that content has been selected.
The mod edit form has been updated, with the name set to "LTI 1.1 tool" now
That 'Custom parameters' contains values like 'Person.name.fufullname=$ll', etc.
That 'Allow {tool} to add grades in the gradebook' is checked
The grade has been set to "Point" with "Maxgrade" set to 50, as per the resource's settings in the tool
Change the name to 'LTI 1.1 tool resource - gradable'.
Click "Save and return to course"
Verify that the "LTI 1.1 tool resource - gradable" activity has been successfully added to the "Platform course" course.
Open the "LTI 1.1 tool resource - gradable" activity.
Verify you can see the saLTIre tool, as an embedded iframe in your platform site.
Create another LTI 1.1 tool activity by repeating the same steps (10-13).
This time, check multiple different options. Example:
LTI launch (with launch URL) - a link to launch this tool
LTI launch 2 (with launch URL) - a link to launch this tool with an associated gradebook column
LTI launch 3 - a link to launch a different tool
Scroll down and press 'Return selection'.
Verify that you see a page that shows a list of items (the selected resources earlier) that will be added to the course.
Click "Save and return to course".
Verify:
All resources have been added as separate activities to the course
All are displayed as an embedded iframe in your platform site.
The relevant settings have been preserved (e.g. Grade settings, etc.)