Details
-
Bug
-
Resolution: Fixed
-
Major
-
3.5.3, 3.6.1, 3.7
-
MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
-
MOODLE_35_STABLE, MOODLE_36_STABLE
-
MDL-64357_master -
-
Description
LineItems created using the Assignment and Grade Services are removed after a few hours due to a bug in the clean-up task. As a result, grade sync is no longer functional and items have to re-created, only to be removed again a few hours down.
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/
Prerequisites:
Add test tool
- Site is configured with at least one course
- Assign a user (instructor) to the manager role site-wide
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
- In the Services section, set the Assignment and Grades service to: ‘use this service for grade sync and column management’
- Confirm tool is saved successfully
Add a ZTest link to the course
- 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
- Save and verify the course is successfully added to the course
Reproducing the issue:
We'll verify that added lineitems disappear when the scheduled task is run when they should be preserved.
- As instructor enter the Course
- Launch the ZTest Link created above
- Check the ZTest app displays all the parameters it received, locate the one that is named custom_lineitems_url (notice the s) and copy the value (a URL)
- In ZTest switch to the tab named AnyCall and
- In URL paste the value of custom_lineitems_url
- In method select POST (You may need to delete the word 'GET' from the field, and use arrow to then select POST)
- In the content type, choose application/vnd.ims.lis.v2.lineitem+json
- A payload is automatically generated in the payload textarea, note the resourceId value
- Press Send!
- Verify a 200 response (meaning a new gradebook column has been created!)
- Now let's use the API to get the lineitems owned by ZTest by:
- change the method to GET
- change the content type to application/vnd.ims.lis.v2.lineitemcontainer+json
- Press Send!
- Verify in the repsonse section we find back our lineitem just created above (by looking at resourceId)
- In another browser
- log as admin
- Navigate to Site Administration > Server > Scheduled Task
- Locate the task LTI Assignment and Grade Services table cleanup
- click on run it now, and confirm
- Go back to the 1st browser where ZTest is loaded
- Press Send! to get once again the line items associated with ZTest
- Verify: the lineitem created in the beginning of this test is no more listed
- Expected: the lineitem must not be removed when the scheduled task is run