-
Functional Test
-
Minor
-
Moodle 4.3
Note: Two sites are required for testing this issue
- LTI consumer
- LTI provider.
Enable LTI provider on course and activity
- Log in as administrator.
- Follow Site administration ► Security ► HTTP security and enable 'Allow frame embedding'.
- Follow Site administration ► Plugins ► Authentication ► Manage authentication' and enable the 'LTI' authentication plugin.
- Follow Site administration ► Plugins ► Enrolments ► Manage enrol plugins and enable 'Publish as LTI tool'.
- Log out and log in as teacher.
- Visit a course with at least 1 activity (assignment) and 1 resource (file).
- Follow Course administration ► Users ► Enrolment methods.
- Add a Publish as LTI tool with 'Tool to be published' selected to course and "LTI version" set to "Legacy LTI"
- Add a Publish as LTI tool with 'Tool to be published' selected to assignment and "LTI version" set to "Legacy LTI"
- Add a Publish as LTI tool with 'Tool to be published' selected to file and "LTI version" set to "Legacy LTI"
- Follow Course administration ► Published as LTI tool.
- Make note of all 3 URLs and secrets.
On your LTI consumer site
- Log in as teacher and visit a course.
- Go to "More > LTI External tools"
- Add 3 'External Tool' activities and use the following from your LTI provider site.
- Tool Provider 'Cartridge URL' as the Tool URL
- Set 'Consumer key' to 'moodle'
- Tool Provider 'Shared secret' as the Secret
- Now, go to the course and add 3 instances - one for each of the tools you just created (just select the respective tool from the activity chooser)
- Log in as a student.
- Visit the course and click on each LTI activity.
- Verify 'External Tool' activity links to course display course.
- Verify 'External Tool' activity links to assignment display assignment.
- Verify 'External Tool' activity links to file display file.
Proxy test
- Copy 'Registration URL' from the 'Course administration ► Published as LTI tool' page in the LTI provider site
- On a consumer site go to Site administration ► Plugins ► External tool ► Manage tools
- Paste the url you copied into the box, but don't click add
- Change the token part of the url to something else such as "ASDF123"
- Click add
- Make sure that there is an error displayed
- Click cancel
- Paste the URL and this time click add with the correct token
- Click continue
- Click save
- The tool should successfully be added.
- Edit the tool and set "Tool configuration usage" to "Show in activity chooser and as a preconfigured tool"
- Save
- Go to a course
- Click to add an activity, selecting the tool you just created
- Click save and display
- Verify it works as expected and you log into LTI provider site correctly