Hide
Testing LTI Advantage Services for 1.1
When deploying a tool (site or course), a tool can be configured to have access to LTI services membership and assignment and grade services (AGS).
For the tests below, a test tool named ZTest will be used. The tool is available at https://ztest.cengage.info/ztest/
Prerequisite:
- Site is configured with at least one course
- Assign a user (instructor) to the manager role site-wide
- Course has at least one student
- Enrol the teacher site-wide
Test 1: Configure a site tool without access to AGS
- Log in as an administrator
- Navigate to Site Administration > Plugins > Manage tools
- Click on configure a tool manually
- Fill the form as follow:
- Tool name: ZTest
- Tool url: https://ztest.cengage.info/ztest/lti11
- Consumer key: moodle-testing
- Shared secret: ztest-secret
- Click on ‘Show more’
- Check Content-Item message
- Icon URL: https://ztest.cengage.info/ztest/img/ztest.png
- Verify:
- There is a services section
- It contains 2 entries:
- IMS LTI Assignment and Grade Services
- IMS LTI Membership
- Both are set to Do not use this service
- Confirm changes are saved successfully
Test 2: Verify services URL are NOT passed in when service is not used
- Log in as instructor
- Navigate to course
- Turn editing ON
- Click Add an activity or resource and select external tool
- On the Add external tool page, select ZTest for preconfigured tool
- Activity Name: ZTest Assignment
- Privacy: check accept grades from the tool
- Grade: maximum points: 50
- Save and display
- ZTest launches and show the received LTI parameters
- Verify the following aren't in the list:
- custom_lineitem_url
- custom_lineitems_url
- custom_context_memberships_url
Test 3: Verify services URL are passed in when services are used
- Log in as administrator
- Navigate to Site Administration > Plugins > Manage tools
- On ZTest click the gear icon
- In the Edit form Services section, change the services to:
- AGS: Use this service for grade sync only
- Memberships: Use this service to retrieve members….
- As instructor, go into the course
- Launch ZTest Assignment (created in Test 2)
- Verify the following are in the list and have the URL of the moodle site:
- custom_lineitem_url
- custom_lineitems_url
- custom_context_memberships_url
Assignment and Grade Services: Coupled
Coupled means Moodle created a grade column for the link, the link and the grade column are linked, the grade column is of type mod and has a direct relationship with the link. In that case, the lineitem URL is passed as a parameter and can be used to post grades.
Prerequisite:
- Continuation of the tests above
- Site must be publicly accessible (use ngrok)
Test 1: Grade can be sent to Moodle using AGS
- Login as Student in the Course
- Launch ZTest Assignment
- Locate custom_lineitem_url, and copy its value (something like {{{moodle}/mod/lti/services.php/{courseid}/lineitems/{gradeitemid}/lineitem?type_id={tooltypeid}||
- Select the AnyCall tab (make sure your browser window is large enough the tabs appear). It lets you send arbitrary calls back to the tool consumer properly signed
- URL: paste the custom_lineitem_url value
- Modify the url by adding /scores at the end of the path, preserve the custom parameters. The url must end by /lineitem/scores?type_id={tooltypeid}
- Method: POST
- Content-Type: application/vnd.ims.lis.v1.score+json
- Payload should pre-fill with a JSON payload, verify it contains
- Userid should be the current student user id.
- scoreGiven: 8
- scoreMaximum: 16
- comment: commented
- Timestamp in ISO 8601
- activityProgress: Completed
- gradingProgress: FullyGraded
- Press send
- Verify 200 shows in the Response
- A grade with the same timestamp will be rejected
- Press send again, this should fail (posting a grade at the exact same timestamp)
- Verify failure, error code 409 is returned
- Verify the grade is in the gradebook and properly scaled
- Navigate to grades
- Verify ZTest Assignment is grade 25 out of 50
- Verify comment says commented
Test 2: Tool can get the clear grade value
- Login as Student in the Course
- Launch ZTest Assignment
- Locate custom_lineitem_url, and copy its value (something like {moodle}/mod/lti/services.php/{courseid}/lineitems/{gradeitemid}/lineitem?type_id={tooltypeid}
- Select the AnyCall tab
- URL: paste the custom_lineitem_url value
- Modify the url by adding /scores at the end of the path, preserve the custom parameters. The url must end by /lineitem/scores?type_id={tooltypeid}
- Method: POST
- Content-Type: application/vnd.ims.lis.v1.score+json
- Payload should pre-fill with a JSON payload, verify it contains
- Userid should be the current student user id.
- Modify the payload:
- Remove scoreGiven, scoreMaximum, comment
- Set the Timestamp to current time in ISO 8601
- Set activityProgress to Initialized
- Set gradingProgress to NotStarted
- Press send
- Verify 200 shows in the Response
- Verify the grade is in the gradebook is cleared
- Navigate to grades
- Verify ZTest Assignment for the student is empty (no score, no comment)
Test 3: Tool can get the current grade value from Gradebook
- Login as instructor and navigate to the course
- Navigate to grades
- Click on the edit (pencil) icon in the ZTest Assignment column.
- Change the Student Grade for ZTest Assignment:
- Tick the override checkbox
- Set grade to '40' points
- Set comments to: overidden!
- Launch ZTest Assignment
- Verify the custom_lineitem_url is present and copy its value
- Select the AnyCall tab
- URL: Paste the url
- Modify the url path to ends with /results
- Method: GET
- Content-Type: application/vnd.ims.lis.v2.resultcontainer+json
- Press send
- Verify:
- 200 Response
- It’s an array of results. It contains the updated result for the student:
- "userId": {student_id}
- "resultScore":40
- "resultMaximum":50
- "comment":"overridden!"
- Other attributes can be ignored
- We can filter the result:
- Modify the URL with an additional query parameter user_id. The URL should now end with ?type_id={tooltypeid}&user_id={student_id}
- Press send
- Verify the response is 200 and is a JSON Array with only one value (same as step 7)
- Modify the URL by changing to a user_id that does not have a grade for this activity (does not even have to be a real user_id)
- Verify the response is 200 with an empty array
Assignment and Grade Services: Uncoupled
Uncoupled columns are columns created through the AGS API. They are not directly linked to a link. Those columns are created as manual columns in Moodle gradebook.
Prerequisite:
- Continuation of the tests above.
- Site must be publicly accessible (use ngrok)
Test 1: Tool can get a list of its line items but cannot create a new one
- Enter the course as instructor
- Turn editing on
- Click Add an activity or resource and select external tool
- On the Add external tool page, select ZTest for preconfigured tool
- Click select Content
- ZTest displays, verify custom_lineitems_url is present; copy its value
- Select the AnyCall tab
- Paste URL in URL
- Method: GET
- Content-Type: application/vnd.ims.lis.v2.lineitemcontainer+json
- Press SEND
- Verify payload:
- Response is a 200
- It’s a JSON Array
- It contains:
- An ID (the ID is the value of the lineitem from the previous set of tests)
- the label (ZTest Assignment)
- the Maximum score (50)
- Now let’s create an additional column
- Modify Method to: POST
- Modify Content Type to: application/vnd.ims.lis.v2.lineitem+json
- A default value for line item should be in payload
- Press SEND
- Verify:
- 403 error
Test 2: Modify tool to allow for line item creations and grade posting
- Log in as admin
- Navigate to Site Administration > Plugins > Manage tools
- Click the gear icon on ZTest to edit it
- Modify the AGS service to: ‘use this service for grade sync and column management’
- Enter the course as instructor
- Turn editing on
- Click Add an activity or resource and select external tool
- On the Add external tool page, select ZTest for preconfigured tool
- Click select Content
- ZTest displays, verify custom_lineitems_url is present; copy its value
- Select the AnyCall tab
- Paste URL in URL
- Method: POST
- Content-Type: application/vnd.ims.lis.v2.lineitem+json
- A default value for line item should be in payload
- Note the scoreMaximum, label, tag and resourceId.
- Press SEND
- Verify payload:
- Response is a 200
- The response is a JSON document, verify the values from 11.e are present and correct
- Let’s post a score to that new column
- From the response payload, copy the value for id. It is the URL for the newly created line item
- Paste it in the URL field
- Append /scores to its path so that the path ends with /lineitem/scores
- Modify the Content Type to: application/vnd.ims.lis.v1.score+json
- A default payload appears. Set the userId value to be the userId of the Student
- Modify scoreGiven, scoreMaximum, comment if desired
- Press Send
- Verify 200 response
- Verify it is in the gradebook
- Navigate to Grades > Grade report
- Verify the column is present as created originally
- Label is as specified
- Maximum points is scoreMaximum
- The column is a manual column
- Verify the score is present
- It is scaled to the points possible for the column
Test 3: Update line item created in Test 2
- Enter the course as instructor
- Launch the ZTest Assignment link
- In the launch params copy the value of custom_lineitems_url
- Select the AnyCall tab
- URL: paste value
- Method: GET
- Content-Type: application/vnd.ims.lis.v2.lineitemcontainer+json
- Press SEND
- Verify payload:
- Response is a 200
- It’s a JSON Array
- It contains the line item definition for ZTest Assignment and the column created in test 2
- Copy the JSON Object for the newly created column from test 2
- Update uncoupled column - change the AnyCall values to:
- Method: PUT
- Content-Type: application/vnd.ims.lis.v2.lineitem+json
- Payload: Paste the JSON Object in the payload box
- URL: Copy the id from that JSON and paste in the URL (that is the line item resource endpoint)
Note: You may need to remove the escaping of values like /
- Press Send
- Verify 200
- Update the payload
- Remove id
- change the label by appending -updated to it
- Add 10 to the scoreMaximum
- Press Send
- Verify 200
- Verify in Gradebook
- Go to grades
- Verify the label of the column is now {label}-updated
- Verify the score maximum is not the updated value
- Verify the student grade has been rescaled accordingly
Test 4: Delete line item created in Test 2
- Enter the course as instructor
- Launch the ZTest Assignment link
- In the launch params copy the value of custom_lineitems_url
- Select the AnyCall tab
- URL: paste value
- Method: GET
- Content-Type: application/vnd.ims.lis.v2.lineitemcontainer+json
- Press SEND
- Verify payload:
- Verify 200 response
- It’s a JSON Array
- It contains the line item definition for ZTest Assignment and the column created in test 2
- Update uncoupled column
- Copy the ID of the column created in test 2
- Paste in the URL
- Method: DELETE
- No Content-Type
- Press send
- Verify 200 response
- Press Send again
- Verify 404 response
- Open Grader Report in the Gradebook
- Verify The column has been removed
Assignment and Grade Services: Backup and restore
Test 1: Create a course and backup
- Enter the course as instructor
- Create a NEW course: Backup_Test
- Turn editing ON for the course
- Fill the Add external tool as follow:
- Click Add an activity or resource and select external tool
- On the Add external tool page, select ZTest for preconfigured tool
- Activity Name: ZTest Assignment
- Privacy: check accept grades from the tool
- Grade: maximum points: 50
- Save and display
- Let’s create an additional column:
- In ZTest, copy the value for custom_lineitems_url
- Select the AnyCall tab
- URL: Paste the URL
- Method: POST
- Content-Type: application/vnd.ims.lis.v2.lineitem+json
- Modify the default payload with: label:’ZTest participation’, resourceId: ‘res-123’ and tag: ‘participation’
- Press Send
- Verify 200
- Go to gradebook
- Verify the 2 columns are created
- Go back to the course and back it up:
- Uncheck Include enrolled users (you probably can't select it anyway)
- Select Jump to Final Step
- Verify: The backup file was successfully created.
- Download the backup
Test 2: Restore the backup in a new course and verify metadata is preserved
This is using the archive created in Test 1
- Login as administraotr
- Restore the backup as a new course
- Enter the course
- Click on Grades
- Confirm there are two grade items, one for the activity and another called 'ZTest participation'
- Go back to the course
- Click on ZTest assignment
- Copy custom_lineitems_url
- Select the AnyCall tab
- Method: GET
- Content Type: application/vnd.ims.lis.v2.lineitemcontainer+json
- Press SEND
- Verify uncoupled column:
- 200 Response
- Payload contains the 2 lineitems created in test 1
- One lineitem has
- label:’ZTest participation’
- resourceId: ‘res-123’
- tag: ‘participation’
- Verify coupled column:
- The other column has ltiLinkId, make note of that value
- View the database table 'mdl_lti' and confirm the 'id' with the value above matches the LTI activity in the newly created course
Names and role provisioning service (aka membership service)
Test 1: Allow access to memberships and get it for context
- Log in as admin
- Navigate to Site Administration > Plugins > Manage tools
- Click the gear icon on ZTest to edit it
- Modify the IMS LTI memberships service to: ‘use this service to retrieve members...’
- Privacy: share launcher's name with tool: Always
- Privacy: share launcher's email with tool: Always
- Log in as instructor in the course
- Click on ZTest assignment
- Copy custom_context_memberships_url
- Select the AnyCall tab
- URL: paste value of custom_context_memberships_url
- Method: GET
- Content Type: application/vnd.ims.lis.v2.membershipcontainer+json
- Press SEND
- Verify enrollment response:
- 200 Response
- Payload contains at least 2 members, one student and one instructor
- names and emails are present for each of those users
Test 2: Membership respects privacy option
- Log in as admin
- Navigate to Site Administration > Plugins > Manage tools
- Click the gear icon on ZTest to edit it
- Modify the IMS LTI memberships service to: ‘use this service to retrieve members...’
- Privacy: share launcher's name with tool: Always
- Privacy: share launcher's email with tool: Never
- Log in as instructor in the course
- Click on ZTest assignment
- Copy custom_context_memberships_url
- Select the AnyCall tab
- URL: paste value of custom_context_memberships_url
- Method: GET
- Content Type: application/vnd.ims.lis.v2.membershipcontainer+json
- Press SEND
- Verify enrollment response:
- 200 Response
- Payload contains at least 2 members, one student and one instructor
- names are present for each of those users
- emails are NOT present
Test 3: Link membership contains message with result sourced id
- Enter the course as instructor
- Click on ZTest assignment
- Copy custom_context_memberships_url
- Select the AnyCall tab
- URL:
- paste value of custom_context_memberships_url
- append: ?rlid=<resource_link_id> (the value for resource link id can be found in the Launch Parameters tab)
- Method: GET
- Content Type: application/vnd.ims.lis.v2.membershipcontainer+json
- Press SEND
- Verify enrollment response:
- 200 Response
- Payload contains at least 2 members, one student and one instructor
- names are present for each of those users
- emails are NOT present
- a message payload is present for each membership
- message_type: basic-lti-launch-request
- it has a value for lis_result_sourcedid which contains the same userid and instanceid is the resource link id
Test 5: Cannot access service if not authorized
- Enter the course as instructor
- Click on ZTest assignment
- Copy custom_context_memberships_url
- Log in as admin
- Navigate to Site Administration > Plugins > Manage tools
- Click the gear icon on ZTest to edit it
- Modify the IMS LTI memberships service to: ‘Do not use this service'
- Log in as instructor in the course
- Click on ZTest assignment
- Verify the custom_context_memberships_url is not present in the launch parameters
- Select the AnyCall tab
- URL:
- paste value of custom_context_memberships_url
- Method: GET
- Content Type: application/vnd.ims.lis.v2.membershipcontainer+json
- Press SEND
- Verify denied access:
- 403 Response
Show
Testing LTI Advantage Services for 1.1
When deploying a tool (site or course), a tool can be configured to have access to LTI services membership and assignment and grade services (AGS).
For the tests below, a test tool named ZTest will be used. The tool is available at https://ztest.cengage.info/ztest/
Prerequisite:
Site is configured with at least one course
Assign a user (instructor) to the manager role site-wide
Course has at least one student
Enrol the teacher site-wide
Test 1: Configure a site tool without access to AGS
Log in as an administrator
Navigate to Site Administration > Plugins > Manage tools
Click on configure a tool manually
Fill the form as follow:
Tool name: ZTest
Tool url: https://ztest.cengage.info/ztest/lti11
Consumer key: moodle-testing
Shared secret: ztest-secret
Click on ‘Show more’
Check Content-Item message
Icon URL: https://ztest.cengage.info/ztest/img/ztest.png
Verify:
There is a services section
It contains 2 entries:
IMS LTI Assignment and Grade Services
IMS LTI Membership
Both are set to Do not use this service
Confirm changes are saved successfully
Test 2: Verify services URL are NOT passed in when service is not used
Log in as instructor
Navigate to course
Turn editing ON
Click Add an activity or resource and select external tool
On the Add external tool page, select ZTest for preconfigured tool
Activity Name: ZTest Assignment
Privacy: check accept grades from the tool
Grade: maximum points: 50
Save and display
ZTest launches and show the received LTI parameters
Verify the following aren't in the list:
custom_lineitem_url
custom_lineitems_url
custom_context_memberships_url
Test 3: Verify services URL are passed in when services are used
Log in as administrator
Navigate to Site Administration > Plugins > Manage tools
On ZTest click the gear icon
In the Edit form Services section, change the services to:
AGS: Use this service for grade sync only
Memberships: Use this service to retrieve members….
As instructor, go into the course
Launch ZTest Assignment (created in Test 2)
Verify the following are in the list and have the URL of the moodle site:
custom_lineitem_url
custom_lineitems_url
custom_context_memberships_url
Assignment and Grade Services: Coupled
Coupled means Moodle created a grade column for the link, the link and the grade column are linked, the grade column is of type mod and has a direct relationship with the link. In that case, the lineitem URL is passed as a parameter and can be used to post grades.
Prerequisite:
Continuation of the tests above
Site must be publicly accessible (use ngrok)
Test 1: Grade can be sent to Moodle using AGS
Login as Student in the Course
Launch ZTest Assignment
Locate custom_lineitem_url , and copy its value (something like {{{moodle}/mod/lti/services.php/{courseid}/lineitems/{gradeitemid}/lineitem?type_id={tooltypeid}||
Select the AnyCall tab (make sure your browser window is large enough the tabs appear). It lets you send arbitrary calls back to the tool consumer properly signed
URL: paste the custom_lineitem_url value
Modify the url by adding /scores at the end of the path, preserve the custom parameters. The url must end by /lineitem/scores?type_id={tooltypeid}
Method: POST
Content-Type: application/vnd.ims.lis.v1.score+json
Payload should pre-fill with a JSON payload, verify it contains
Userid should be the current student user id.
scoreGiven: 8
scoreMaximum: 16
comment: commented
Timestamp in ISO 8601
activityProgress: Completed
gradingProgress: FullyGraded
Press send
Verify 200 shows in the Response
A grade with the same timestamp will be rejected
Press send again, this should fail (posting a grade at the exact same timestamp)
Verify failure, error code 409 is returned
Verify the grade is in the gradebook and properly scaled
Navigate to grades
Verify ZTest Assignment is grade 25 out of 50
Verify comment says commented
Test 2: Tool can get the clear grade value
Login as Student in the Course
Launch ZTest Assignment
Locate custom_lineitem_url, and copy its value (something like {moodle}/mod/lti/services.php/{courseid}/lineitems/{gradeitemid}/lineitem?type_id={tooltypeid}
Select the AnyCall tab
URL: paste the custom_lineitem_url value
Modify the url by adding /scores at the end of the path, preserve the custom parameters. The url must end by /lineitem/scores?type_id={tooltypeid}
Method: POST
Content-Type: application/vnd.ims.lis.v1.score+json
Payload should pre-fill with a JSON payload, verify it contains
Userid should be the current student user id.
Modify the payload:
Remove scoreGiven, scoreMaximum, comment
Set the Timestamp to current time in ISO 8601
Set activityProgress to Initialized
Set gradingProgress to NotStarted
Press send
Verify 200 shows in the Response
Verify the grade is in the gradebook is cleared
Navigate to grades
Verify ZTest Assignment for the student is empty (no score, no comment)
Test 3: Tool can get the current grade value from Gradebook
Login as instructor and navigate to the course
Navigate to grades
Click on the edit (pencil) icon in the ZTest Assignment column.
Change the Student Grade for ZTest Assignment:
Tick the override checkbox
Set grade to '40' points
Set comments to: overidden!
Launch ZTest Assignment
Verify the custom_lineitem_url is present and copy its value
Select the AnyCall tab
URL: Paste the url
Modify the url path to ends with /results
Method: GET
Content-Type: application/vnd.ims.lis.v2.resultcontainer+json
Press send
Verify:
200 Response
It’s an array of results. It contains the updated result for the student:
"userId": {student_id}
"resultScore":40
"resultMaximum":50
"comment":"overridden!"
Other attributes can be ignored
We can filter the result:
Modify the URL with an additional query parameter user_id. The URL should now end with ?type_id={tooltypeid}&user_id={student_id}
Press send
Verify the response is 200 and is a JSON Array with only one value (same as step 7)
Modify the URL by changing to a user_id that does not have a grade for this activity (does not even have to be a real user_id)
Verify the response is 200 with an empty array
Assignment and Grade Services: Uncoupled
Uncoupled columns are columns created through the AGS API. They are not directly linked to a link. Those columns are created as manual columns in Moodle gradebook.
Prerequisite:
Continuation of the tests above.
Site must be publicly accessible (use ngrok)
Test 1: Tool can get a list of its line items but cannot create a new one
Enter the course as instructor
Turn editing on
Click Add an activity or resource and select external tool
On the Add external tool page, select ZTest for preconfigured tool
Click select Content
ZTest displays, verify custom_lineitems_url is present; copy its value
Select the AnyCall tab
Paste URL in URL
Method: GET
Content-Type: application/vnd.ims.lis.v2.lineitemcontainer+json
Press SEND
Verify payload:
Response is a 200
It’s a JSON Array
It contains:
An ID (the ID is the value of the lineitem from the previous set of tests)
the label (ZTest Assignment)
the Maximum score (50)
Now let’s create an additional column
Modify Method to: POST
Modify Content Type to: application/vnd.ims.lis.v2.lineitem+json
A default value for line item should be in payload
Press SEND
Verify:
403 error
Test 2: Modify tool to allow for line item creations and grade posting
Log in as admin
Navigate to Site Administration > Plugins > Manage tools
Click the gear icon on ZTest to edit it
Modify the AGS service to: ‘use this service for grade sync and column management’
Enter the course as instructor
Turn editing on
Click Add an activity or resource and select external tool
On the Add external tool page, select ZTest for preconfigured tool
Click select Content
ZTest displays, verify custom_lineitems_url is present; copy its value
Select the AnyCall tab
Paste URL in URL
Method: POST
Content-Type: application/vnd.ims.lis.v2.lineitem+json
A default value for line item should be in payload
Note the scoreMaximum, label, tag and resourceId.
Press SEND
Verify payload:
Response is a 200
The response is a JSON document, verify the values from 11.e are present and correct
Let’s post a score to that new column
From the response payload, copy the value for id. It is the URL for the newly created line item
Paste it in the URL field
Append /scores to its path so that the path ends with /lineitem/scores
Modify the Content Type to: application/vnd.ims.lis.v1.score+json
A default payload appears. Set the userId value to be the userId of the Student
Modify scoreGiven, scoreMaximum, comment if desired
Press Send
Verify 200 response
Verify it is in the gradebook
Navigate to Grades > Grade report
Verify the column is present as created originally
Label is as specified
Maximum points is scoreMaximum
The column is a manual column
Verify the score is present
It is scaled to the points possible for the column
Test 3: Update line item created in Test 2
Enter the course as instructor
Launch the ZTest Assignment link
In the launch params copy the value of custom_lineitems_url
Select the AnyCall tab
URL: paste value
Method: GET
Content-Type: application/vnd.ims.lis.v2.lineitemcontainer+json
Press SEND
Verify payload:
Response is a 200
It’s a JSON Array
It contains the line item definition for ZTest Assignment and the column created in test 2
Copy the JSON Object for the newly created column from test 2
Update uncoupled column - change the AnyCall values to:
Method: PUT
Content-Type: application/vnd.ims.lis.v2.lineitem+json
Payload: Paste the JSON Object in the payload box
URL: Copy the id from that JSON and paste in the URL (that is the line item resource endpoint)
Note: You may need to remove the escaping of values like /
Press Send
Verify 200
Update the payload
Remove id
change the label by appending -updated to it
Add 10 to the scoreMaximum
Press Send
Verify 200
Verify in Gradebook
Go to grades
Verify the label of the column is now {label}-updated
Verify the score maximum is not the updated value
Verify the student grade has been rescaled accordingly
Test 4: Delete line item created in Test 2
Enter the course as instructor
Launch the ZTest Assignment link
In the launch params copy the value of custom_lineitems_url
Select the AnyCall tab
URL: paste value
Method: GET
Content-Type: application/vnd.ims.lis.v2.lineitemcontainer+json
Press SEND
Verify payload:
Verify 200 response
It’s a JSON Array
It contains the line item definition for ZTest Assignment and the column created in test 2
Update uncoupled column
Copy the ID of the column created in test 2
Paste in the URL
Method: DELETE
No Content-Type
Press send
Verify 200 response
Press Send again
Verify 404 response
Open Grader Report in the Gradebook
Verify The column has been removed
Assignment and Grade Services: Backup and restore
Test 1: Create a course and backup
Enter the course as instructor
Create a NEW course: Backup_Test
Turn editing ON for the course
Fill the Add external tool as follow:
Click Add an activity or resource and select external tool
On the Add external tool page, select ZTest for preconfigured tool
Activity Name: ZTest Assignment
Privacy: check accept grades from the tool
Grade: maximum points: 50
Save and display
Let’s create an additional column:
In ZTest, copy the value for custom_lineitems_url
Select the AnyCall tab
URL: Paste the URL
Method: POST
Content-Type: application/vnd.ims.lis.v2.lineitem+json
Modify the default payload with: label:’ZTest participation’, resourceId: ‘res-123’ and tag: ‘participation’
Press Send
Verify 200
Go to gradebook
Verify the 2 columns are created
Go back to the course and back it up:
Uncheck Include enrolled users (you probably can't select it anyway)
Select Jump to Final Step
Verify: The backup file was successfully created.
Download the backup
Test 2: Restore the backup in a new course and verify metadata is preserved
This is using the archive created in Test 1
Login as administraotr
Restore the backup as a new course
Enter the course
Click on Grades
Confirm there are two grade items, one for the activity and another called 'ZTest participation'
Go back to the course
Click on ZTest assignment
Copy custom_lineitems_url
Select the AnyCall tab
Method: GET
Content Type: application/vnd.ims.lis.v2.lineitemcontainer+json
Press SEND
Verify uncoupled column:
200 Response
Payload contains the 2 lineitems created in test 1
One lineitem has
label:’ZTest participation’
resourceId: ‘res-123’
tag: ‘participation’
Verify coupled column:
The other column has ltiLinkId, make note of that value
View the database table 'mdl_lti' and confirm the 'id' with the value above matches the LTI activity in the newly created course
Names and role provisioning service (aka membership service)
Test 1: Allow access to memberships and get it for context
Log in as admin
Navigate to Site Administration > Plugins > Manage tools
Click the gear icon on ZTest to edit it
Modify the IMS LTI memberships service to: ‘use this service to retrieve members...’
Privacy: share launcher's name with tool: Always
Privacy: share launcher's email with tool: Always
Log in as instructor in the course
Click on ZTest assignment
Copy custom_context_memberships_url
Select the AnyCall tab
URL: paste value of custom_context_memberships_url
Method: GET
Content Type: application/vnd.ims.lis.v2.membershipcontainer+json
Press SEND
Verify enrollment response:
200 Response
Payload contains at least 2 members, one student and one instructor
names and emails are present for each of those users
Test 2: Membership respects privacy option
Log in as admin
Navigate to Site Administration > Plugins > Manage tools
Click the gear icon on ZTest to edit it
Modify the IMS LTI memberships service to: ‘use this service to retrieve members...’
Privacy: share launcher's name with tool: Always
Privacy: share launcher's email with tool: Never
Log in as instructor in the course
Click on ZTest assignment
Copy custom_context_memberships_url
Select the AnyCall tab
URL: paste value of custom_context_memberships_url
Method: GET
Content Type: application/vnd.ims.lis.v2.membershipcontainer+json
Press SEND
Verify enrollment response:
200 Response
Payload contains at least 2 members, one student and one instructor
names are present for each of those users
emails are NOT present
Test 3: Link membership contains message with result sourced id
Enter the course as instructor
Click on ZTest assignment
Copy custom_context_memberships_url
Select the AnyCall tab
URL:
paste value of custom_context_memberships_url
append: ?rlid=<resource_link_id> (the value for resource link id can be found in the Launch Parameters tab)
Method: GET
Content Type: application/vnd.ims.lis.v2.membershipcontainer+json
Press SEND
Verify enrollment response:
200 Response
Payload contains at least 2 members, one student and one instructor
names are present for each of those users
emails are NOT present
a message payload is present for each membership
message_type: basic-lti-launch-request
it has a value for lis_result_sourcedid which contains the same userid and instanceid is the resource link id
Test 5: Cannot access service if not authorized
Enter the course as instructor
Click on ZTest assignment
Copy custom_context_memberships_url
Log in as admin
Navigate to Site Administration > Plugins > Manage tools
Click the gear icon on ZTest to edit it
Modify the IMS LTI memberships service to: ‘Do not use this service'
Log in as instructor in the course
Click on ZTest assignment
Verify the custom_context_memberships_url is not present in the launch parameters
Select the AnyCall tab
URL:
paste value of custom_context_memberships_url
Method: GET
Content Type: application/vnd.ims.lis.v2.membershipcontainer+json
Press SEND
Verify denied access:
403 Response