-
Functional Test
-
Minor
-
Moodle 4.0
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.
Registration and publication
- 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 docs linked above, specifically the section on Dynamic registration, create the tool-platform registration
- In the platform site, edit the preconfigured tool settings for the 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"
- Change "IMS LTI Assignment and Grade Service" to "Use this service for grade sync and column management"
- Expand "Privacy" and set "Accept grades from the tool" to "As specified in Deep Linking definition or Delegate to teacher"
- Save the tool configuration
- In the tool site, login as admin
- Create a course with a two assignments: assignment 1 and assignment 2
- Edit the settings for assignment 2
- Expand "Activity completion" and set "completion tracking" to "Show activity as complete when conditions are met"
- Check the box "Student must submit to this activity to complete it"
- Enrol a teacher t1 in the course
- Log out
- Log in to the tool site as a teacher t1
- Following the docs linked above, specifically the section on Sharing access to a course or activity, publish assignment 1 over LTI Advantage. When publishing, use the form defaults.
- Repeat the publishing process to publish assignment 2 over LTI Advantage also.
- Edit the settings of the enrolment instance for assignment 1
- Expand "Remote system" and set "Grade synchronisation" to "No"
- Save the instance
- Edit the settings for the enrolment instance for assignment 2
- Expand "Remote system" and set "Require course or activity completion prior to grade synchronisation" to "Yes"
- Save the instance
- Log out of BOTH the tool and platform sites
Create the activity links and make submissions
- Log in to the platform site as an admin
- Create a course and enrol a teacher t1 and student s1
- Log out
- Log in to the platform as the teacher t1
- Go to the course
- Enable editing
- Click to add an activity or resource
- Select "QA test tool"
- Click "Select content"
- When prompted, open a new tab in the same browser session and log in to the tool site as the teacher, relaunching the Select content workflow when done (i.e. just close the modal and click "Select content" again)
- Continue to link your account
- When you see the listing of published activities, select the "Add to course" checkbox for assignment 1
- Verify the "Add to gradebook" checkbox is also set automatically at this time
- Click "Add content"
- Save the activity
- Click again to add an activity or resource, selecting again the "QA test tool"
- Click "Select content"
- This time, check the "Add to course" box for assignment 2
- Again, Verify that the "Add to gradebook" checkbox is automatically checked
- Click "Add content"
- Save the activity
- Log out of BOTH the tool and the 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 platform as the student s1
- Go to the course
- Launch assignment 1 activity and make a submission
- Launch assignment 2 but DO NOT make a submission
- Log out of BOTH the tool and the platform sites
Grade the submissions
- Log in to the platform site as the teacher t1
- Go to the course
- Launch the assignment 1 activity
- Grade the student submission, giving them 70/100
- Launch the assignment 2 activity
- Grade the student submission, giving them 80/100
Test synchronisation of grades
- Log in to the platform site as the teacher t1
- Go to the course gradebook
- Verify:
- There is not yet a grade for the student s1 for the assignment 1 activity
- There is not yet a grade for the student s1 for the assignment 2 activity
- Now, run the grade sync scheduled task on the tool site, via CLI:
php admin/cli/scheduled_task.php --execute='\enrol_lti\local\ltiadvantage\task\sync_grades'
- When the task completes, refresh the grade book page
- Verify you still don't see any grades for student s1 for either activity
- Now, in another tab, log into the tool site as the teacher t1
- Go to the course in which the activity is published
- Go to "Published as LTI tools" via course administration
- Edit the instance settings for assignment 1
- Expand "Remote system" and set "Grade synchronisation" to "Yes"
- Save the instance.
- Now, go back to the platform gradebook view in the other tab
- Again, run the grade sync scheduled task on the tool site, via CLI:
php admin/cli/scheduled_task.php --execute='\enrol_lti\local\ltiadvantage\task\sync_grades'
- When the task completes, refresh the gradebook page
- Verify:
- You now see the grade for the student for the assignment 1 activity listed as 70/100.
- You still don't see a grade for assignment 2
- Log out of BOTH the tool and platform sites
- Log in to the platform site as student s1
- Go to the course
- Launch the assignment 2 activity
- Now, make a submission (this will trigger activity completion and enable grades to be synced)
- Log out
- Log in to the platform as teacher t1
- Go to the course gradebook
- Again, run the grade sync scheduled task on the tool site, via CLI:
php admin/cli/scheduled_task.php --execute='\enrol_lti\local\ltiadvantage\task\sync_grades'
- When the task completes, refresh the gradebook page
- Verify:
- You see the grade for the student for the assignment 1 activity listed as 70/100 (as before).
- You now see a grade of 80/100 for assignment 2 for student s1
- is a QA test written for
-
MDL-69542 LTI: Update tool provider feature to support 1.3
- Closed