-
Functional Test
-
Minor
-
Moodle 4.3
Docs
The relevant documentation for this feature can be found at Publish as LTI tool
Prerequisites
Two sites are required for testing this feature and they must be able to communicate with one another.
- LTI platform (formerly known as consumer)
- LTI tool (formerly known as provider).
Important: If you're testing locally, you'll need to disable the 'Blocked hosts' setting in BOTH sites. You can find it in Site administration ► Security ► HTTP security. You'll need to clear the values and save. - In the tool site, create a course with:
- One assignment
- One file resource
- Enrol a teacher t1 in the course
- In the platform site, create a course
- Enrol two teachers: t1 and t2
- Enrol one student, s1
Register the tool and platform
- Following the docs linked above, specifically the section on Enabling the 'Publish as LTI tool' feature, enable the relevant plugins in the tool site.
- Following the instructions in the docs link above, create the tool-platform registration (dynamic or manual - either is fine).
- When complete, log out of BOTH the tool site and the platform site
- On the platform site, log in as the admin and go to Site Administration ► Plugins ► External tool ► Manage tools
- Edit the settings for the preconfigured tool you just created.
- Set "Tool configuration usage" to "Show in activity chooser and as a preconfigured tool"
- Change the name of the tool to "QA test tool"
- Expand "Privacy" and set "Share launcher's name with tool" to "Delegate to teacher"
- Again in "Privacy", set "Share launcher's email with tool" to "Delegate to teacher"
- Save the tool configuration
- Click "Activate" on the tool card (this is only required if you used dynamic registration!).
- Log out
Publish a course, activity and resource on the tool site
- Log in to the tool site as the teacher t1
- Visit the course
- Follow Course administration ► Published as LTI tools
- Make sure you're on the LTI Advantage tab
- Add a new instance, setting 'Tool to be published' to the course.
- Add a new instance, setting 'Tool to be published' to the assignment
- Add a new instance, setting 'Tool to be published' selected to the file resource.
- Verify you now have 3 published items
- Log out of the tool site now.
On the platform site
- Log in as teacher t1 and visit the course.
- Click to add an activity or resource
- Select "QA test tool" from the activity chooser
- On the activity edit view, click "Select content"
- Verify you're presented with a popup containing a message asking you to first sign in to the tool site in another tab.
- Follow the instructions, signing in to the tool site as teacher t1 in another tab.
- In the platform view, close the popup and click "Select content" again
- Verify you're prompted to link the account you just signed in to the tool with
- Click to link the account and continue when you see the success message
- Verify you now see a list of published resources/activities including the 3 items you published earlier
- Check the "Add to course" box for the course
- Verify the "Add to gradebook" checkbox is automatically ticked.
- Click "Add content"
- Save the activity
- Repeat the above process to create activities for the remaining two published items (the activity and the resource). The resource won't have an "Add to gradebook" checkbox - that's expected.
- Now, log out of the platform
- Log in to the platform as a student.
- Visit the course and click on each LTI activity.
- Verify each external tool instance takes you to the corresponding course/activity/resource in the tool.
- Log out of BOTH the tool and platform sites (note:you may need to visit TOOLSITE/login/index.php on the tool site to trigger a logout if running in embedded mode, since the site will be shown without navigation)
- Log in to the tool site as the teacher t1
- Go to the course
- Follow Course administration ► Published as LTI tools
- For the assignment instance, copy the "Launch URL" and "Custom properties" into a text file (we'll need this in a moment)
- Log out of the tool site
- Log in to the platform site as the teacher t2 (user t2 will simulate a user having no account in the tool site and thus being unable to use deep linking content selection)
- Go to the course
- Enable editing
- Click to add an activity or resource, selecting "QA test tool" from the activity chooser
- On the external tool setting page, set the following:
- Set "Activity name" to "Manually configured assignment link"
- Set "Tool URL" to the value of the "Launch URL" you just copied to the text file earlier
- Set "Custom parameters" to the value of the "Custom properties" you just copied to the text file earlier
- Save the activity
- Launch the activity "Manually configured assignment link" and confirm you're prompted to either link an existing account or create a new account
- Use the "Create a new account" option
- Verify you can now see the assignment
- is a QA test written for
-
MDL-69542 LTI: Update tool provider feature to support 1.3
- Closed