Show
Setup
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" with 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.
Deep link launch
Log out of both the platform and tool sites completely.
In the platform site, login at 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.
Verify you're 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 resulting modal pane. (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 9-10 and publish ‘Assign 2’ and the file resource.
Now, go back to the platform site and again, click "Select content".
Verify :
You are not asked to log in this time (you should still be signed in from the last time).
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 see only see “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):
That the mod edit form has been updated, with name set to "Assign 1" now
That 'Custom parameters' contains a value like 'id=some-uuid-value-here'
That 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 In the “Platform course” course
Open the “Assign 1” activity.
Verify you can see the assignment from the tool site, as an embedded iframe in your platform site.
Go to the settings page of “Assign 1” activity
Verify that there is an indicator that content is already selected.
Click “Select content”
Make sure both checkboxes only for "Assign 2" are checked this time
Click “Add content”
Verify you see (you may need to click "Show more" to see this option):
That the mod edit form has been updated, with name set to "Assign 2" now.
That 'Custom parameters' contains a value like 'id=some-uuid-value-here'
That 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 in your platform site.
Now go back to the “Platform course” course and add a new Tool activity.
Click “Select content”.
Make sure both checkboxes only 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)