Details

    • Testing Instructions:
      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:
      1. Site is configured with at least one course
      2. Assign a user (instructor) to the manager role site-wide
      3. Course has at least one student
      4. Enrol the teacher site-wide
      Test 1: Configure a site tool without access to AGS
      1. Log in as an administrator
      2. Navigate to Site Administration > Plugins > Manage tools
      3. Click on configure a tool manually
      4. Fill the form as follow:
        1. Tool name: ZTest
        2. Tool url: https://ztest.cengage.info/ztest/lti11
        3. Consumer key: moodle-testing
        4. Shared secret: ztest-secret
        5. Click on ‘Show more’
        6. Check Content-Item message
        7. Icon URL: https://ztest.cengage.info/ztest/img/ztest.png
      5. Verify:
        1. There is a services section
        2. It contains 2 entries:
          1. IMS LTI Assignment and Grade Services
          2. IMS LTI Membership
        3. Both are set to Do not use this service
      6. Confirm changes are saved successfully
      Test 2: Verify services URL are NOT passed in when service is not used
      1. Log in as instructor
      2. Navigate to course
      3. Turn editing ON
      4. Click Add an activity or resource and select external tool
      5. On the Add external tool page, select ZTest for preconfigured tool
      6. Activity Name: ZTest Assignment
      7. Privacy: check accept grades from the tool
      8. Grade: maximum points: 50
      9. Save and display
      10. ZTest launches and show the received LTI parameters
      11. Verify the following aren't in the list:
        1. custom_lineitem_url
        2. custom_lineitems_url
        3. custom_context_memberships_url
      Test 3: Verify services URL are passed in when services are used
      1. Log in as administrator
      2. Navigate to Site Administration > Plugins > Manage tools
      3. On ZTest click the gear icon
      4. In the Edit form Services section, change the services to:
        1. AGS: Use this service for grade sync only
        2. Memberships: Use this service to retrieve members….
      5. As instructor, go into the course
      6. Launch ZTest Assignment (created in Test 2)
      7. Verify the following are in the list and have the URL of the moodle site:
        1. custom_lineitem_url
        2. custom_lineitems_url
        3. 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:
      1. Continuation of the tests above
      2. Site must be publicly accessible (use ngrok)
      Test 1: Grade can be sent to Moodle using AGS
      1. Login as Student in the Course
      2. Launch ZTest Assignment
      3. Locate custom_lineitem_url, and copy its value (something like {{{moodle}/mod/lti/services.php/{courseid}/lineitems/{gradeitemid}/lineitem?type_id={tooltypeid}||
      4. 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
        1. URL: paste the custom_lineitem_url value
        2. 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}
        3. Method: POST
        4. Content-Type: application/vnd.ims.lis.v1.score+json
        5. Payload should pre-fill with a JSON payload, verify it contains
          1. Userid should be the current student user id.
          2. scoreGiven: 8
          3. scoreMaximum: 16
          4. comment: commented
          5. Timestamp in ISO 8601
          6. activityProgress: Completed
          7. gradingProgress: FullyGraded
        6. Press send
        7. Verify 200 shows in the Response
      5. A grade with the same timestamp will be rejected
        1. Press send again, this should fail (posting a grade at the exact same timestamp)
        2. Verify failure, error code 409 is returned
      6. Verify the grade is in the gradebook and properly scaled
        1. Navigate to grades
        2. Verify ZTest Assignment is grade 25 out of 50
        3. Verify comment says commented
      Test 2: Tool can get the clear grade value
      1. Login as Student in the Course
      2. Launch ZTest Assignment
      3. Locate custom_lineitem_url, and copy its value (something like {moodle}/mod/lti/services.php/{courseid}/lineitems/{gradeitemid}/lineitem?type_id={tooltypeid}
      4. Select the AnyCall tab
        1. URL: paste the custom_lineitem_url value
        2. 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}
        3. Method: POST
        4. Content-Type: application/vnd.ims.lis.v1.score+json
        5. Payload should pre-fill with a JSON payload, verify it contains
          1. Userid should be the current student user id.
        6. Modify the payload:
          1. Remove scoreGiven, scoreMaximum, comment
          2. Set the Timestamp to current time in ISO 8601
          3. Set activityProgress to Initialized
          4. Set gradingProgress to NotStarted
        7. Press send
        8. Verify 200 shows in the Response
      5. Verify the grade is in the gradebook is cleared
        1. Navigate to grades
        2. Verify ZTest Assignment for the student is empty (no score, no comment)
      Test 3: Tool can get the current grade value from Gradebook
      1. Login as instructor and navigate to the course
      2. Navigate to grades
      3. Click on the edit (pencil) icon in the ZTest Assignment column.
      4. Change the Student Grade for ZTest Assignment:
        1. Tick the override checkbox
        2. Set grade to '40' points
        3. Set comments to: overidden!
      5. Launch ZTest Assignment
      6. Verify the custom_lineitem_url is present and copy its value
      7. Select the AnyCall tab
        1. URL: Paste the url
        2. Modify the url path to ends with /results
        3. Method: GET
        4. Content-Type: application/vnd.ims.lis.v2.resultcontainer+json
        5. Press send
      8. Verify:
        1. 200 Response
        2. It’s an array of results. It contains the updated result for the student:
          1. "userId": {student_id}
          2. "resultScore":40
          3. "resultMaximum":50
          4. "comment":"overridden!"
          5. Other attributes can be ignored
      9. We can filter the result:
        1. Modify the URL with an additional query parameter user_id. The URL should now end with ?type_id={tooltypeid}&user_id={student_id}
        2. Press send
        3. Verify the response is 200 and is a JSON Array with only one value (same as step 7)
        4. 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)
        5. 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:
      1. Continuation of the tests above.
      2. Site must be publicly accessible (use ngrok)
      Test 1: Tool can get a list of its line items but cannot create a new one
      1. Enter the course as instructor
      2. Turn editing on
      3. Click Add an activity or resource and select external tool
      4. On the Add external tool page, select ZTest for preconfigured tool
      5. Click select Content
      6. ZTest displays, verify custom_lineitems_url is present; copy its value
      7. Select the AnyCall tab
        1. Paste URL in URL
        2. Method: GET
        3. Content-Type: application/vnd.ims.lis.v2.lineitemcontainer+json
        4. Press SEND
      8. Verify payload:
        1. Response is a 200
        2. It’s a JSON Array
        3. It contains:
          1. An ID (the ID is the value of the lineitem from the previous set of tests)
          2. the label (ZTest Assignment)
          3. the Maximum score (50)
      9. Now let’s create an additional column
        1. Modify Method to: POST
        2. Modify Content Type to: application/vnd.ims.lis.v2.lineitem+json
        3. A default value for line item should be in payload
        4. Press SEND
      10. Verify:
        1. 403 error
      Test 2: Modify tool to allow for line item creations and grade posting
      1. Log in as admin
      2. Navigate to Site Administration > Plugins > Manage tools
      3. Click the gear icon on ZTest to edit it
      4. Modify the AGS service to: ‘use this service for grade sync and column management’
      5. Enter the course as instructor
      6. Turn editing on
      7. Click Add an activity or resource and select external tool
      8. On the Add external tool page, select ZTest for preconfigured tool
      9. Click select Content
      10. ZTest displays, verify custom_lineitems_url is present; copy its value
      11. Select the AnyCall tab
        1. Paste URL in URL
        2. Method: POST
        3. Content-Type: application/vnd.ims.lis.v2.lineitem+json
        4. A default value for line item should be in payload
        5. Note the scoreMaximum, label, tag and resourceId.
        6. Press SEND
      12. Verify payload:
        1. Response is a 200
        2. The response is a JSON document, verify the values from 11.e are present and correct
      13. Let’s post a score to that new column
        1. From the response payload, copy the value for id. It is the URL for the newly created line item
        2. Paste it in the URL field
        3. Append /scores to its path so that the path ends with /lineitem/scores
        4. Modify the Content Type to: application/vnd.ims.lis.v1.score+json
        5. A default payload appears. Set the userId value to be the userId of the Student
        6. Modify scoreGiven, scoreMaximum, comment if desired
        7. Press Send
        8. Verify 200 response
      14. Verify it is in the gradebook
        1. Navigate to Grades > Grade report
        2. Verify the column is present as created originally
          1. Label is as specified
          2. Maximum points is scoreMaximum
          3. The column is a manual column
        3. Verify the score is present
          1. It is scaled to the points possible for the column
      Test 3: Update line item created in Test 2
      1. Enter the course as instructor
      2. Launch the ZTest Assignment link
      3. In the launch params copy the value of custom_lineitems_url
      4. Select the AnyCall tab
        1. URL: paste value
        2. Method: GET
        3. Content-Type: application/vnd.ims.lis.v2.lineitemcontainer+json
        4. Press SEND
      5. Verify payload:
        1. Response is a 200
        2. It’s a JSON Array
        3. It contains the line item definition for ZTest Assignment and the column created in test 2
        4. Copy the JSON Object for the newly created column from test 2
      6. Update uncoupled column - change the AnyCall values to:
        1. Method: PUT
        2. Content-Type: application/vnd.ims.lis.v2.lineitem+json
        3. Payload: Paste the JSON Object in the payload box
        4. 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 /
        5. Press Send
          1. Verify 200
        6. Update the payload
          1. Remove id
          2. change the label by appending -updated to it
          3. Add 10 to the scoreMaximum
        7. Press Send
        8. Verify 200
      7. Verify in Gradebook
        1. Go to grades
        2. Verify the label of the column is now {label}-updated
        3. Verify the score maximum is not the updated value
        4. Verify the student grade has been rescaled accordingly
      Test 4: Delete line item created in Test 2
      1. Enter the course as instructor
      2. Launch the ZTest Assignment link
      3. In the launch params copy the value of custom_lineitems_url
      4. Select the AnyCall tab
        1. URL: paste value
        2. Method: GET
        3. Content-Type: application/vnd.ims.lis.v2.lineitemcontainer+json
        4. Press SEND
      5. Verify payload:
        1. Verify 200 response
        2. It’s a JSON Array
        3. It contains the line item definition for ZTest Assignment and the column created in test 2
      6. Update uncoupled column
        1. Copy the ID of the column created in test 2
        2. Paste in the URL
        3. Method: DELETE
        4. No Content-Type
        5. Press send
          1. Verify 200 response
        6. Press Send again
          1. Verify 404 response
      7. Open Grader Report in the Gradebook
        1. Verify The column has been removed

      Assignment and Grade Services: Backup and restore

      Test 1: Create a course and backup
      1. Enter the course as instructor
      2. Create a NEW course: Backup_Test
      3. Turn editing ON for the course
      4. Fill the Add external tool as follow:
        1. Click Add an activity or resource and select external tool
        2. On the Add external tool page, select ZTest for preconfigured tool
        3. Activity Name: ZTest Assignment
        4. Privacy: check accept grades from the tool
        5. Grade: maximum points: 50
        6. Save and display
      5. Let’s create an additional column:
        1. In ZTest, copy the value for custom_lineitems_url
      6. Select the AnyCall tab
        1. URL: Paste the URL
        2. Method: POST
        3. Content-Type: application/vnd.ims.lis.v2.lineitem+json
        4. Modify the default payload with: label:’ZTest participation’, resourceId: ‘res-123’ and tag: ‘participation’
        5. Press Send
          1. Verify 200
      7. Go to gradebook
        1. Verify the 2 columns are created
      8. Go back to the course and back it up:
        1. Uncheck Include enrolled users (you probably can't select it anyway)
        2. Select Jump to Final Step
      9. Verify: The backup file was successfully created.
      10. 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

      1. Login as administraotr
      2. Restore the backup as a new course
      3. Enter the course
      4. Click on Grades
        1. Confirm there are two grade items, one for the activity and another called 'ZTest participation'
      5. Go back to the course
      6. Click on ZTest assignment
      7. Copy custom_lineitems_url
      8. Select the AnyCall tab
        1. Method: GET
        2. Content Type: application/vnd.ims.lis.v2.lineitemcontainer+json
        3. Press SEND
      9. Verify uncoupled column:
        1. 200 Response
        2. Payload contains the 2 lineitems created in test 1
        3. One lineitem has
          1. label:’ZTest participation’
          2. resourceId: ‘res-123’
          3. tag: ‘participation’
      10. Verify coupled column:
        1. The other column has ltiLinkId, make note of that value
        2. 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
      1. Log in as admin
      2. Navigate to Site Administration > Plugins > Manage tools
      3. Click the gear icon on ZTest to edit it
        1. Modify the IMS LTI memberships service to: ‘use this service to retrieve members...’
        2. Privacy: share launcher's name with tool: Always
        3. Privacy: share launcher's email with tool: Always
      4. Log in as instructor in the course
      5. Click on ZTest assignment
      6. Copy custom_context_memberships_url
      7. Select the AnyCall tab
        1. URL: paste value of custom_context_memberships_url
        2. Method: GET
        3. Content Type: application/vnd.ims.lis.v2.membershipcontainer+json
        4. Press SEND
      8. Verify enrollment response:
        1. 200 Response
        2. Payload contains at least 2 members, one student and one instructor
        3. names and emails are present for each of those users
      Test 2: Membership respects privacy option
      1. Log in as admin
      2. Navigate to Site Administration > Plugins > Manage tools
      3. Click the gear icon on ZTest to edit it
        1. Modify the IMS LTI memberships service to: ‘use this service to retrieve members...’
        2. Privacy: share launcher's name with tool: Always
        3. Privacy: share launcher's email with tool: Never
      4. Log in as instructor in the course
      5. Click on ZTest assignment
      6. Copy custom_context_memberships_url
      7. Select the AnyCall tab
        1. URL: paste value of custom_context_memberships_url
        2. Method: GET
        3. Content Type: application/vnd.ims.lis.v2.membershipcontainer+json
        4. Press SEND
      8. Verify enrollment response:
        1. 200 Response
        2. Payload contains at least 2 members, one student and one instructor
        3. names are present for each of those users
        4. emails are NOT present
      Test 3: Link membership contains message with result sourced id
      1. Enter the course as instructor
      2. Click on ZTest assignment
      3. Copy custom_context_memberships_url
      4. Select the AnyCall tab
        1. URL:
          1. paste value of custom_context_memberships_url
          2. append: ?rlid=<resource_link_id> (the value for resource link id can be found in the Launch Parameters tab)
        2. Method: GET
        3. Content Type: application/vnd.ims.lis.v2.membershipcontainer+json
        4. Press SEND
      5. Verify enrollment response:
        1. 200 Response
        2. Payload contains at least 2 members, one student and one instructor
        3. names are present for each of those users
        4. emails are NOT present
        5. a message payload is present for each membership
          1. message_type: basic-lti-launch-request
          2. 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

      1. Enter the course as instructor
      2. Click on ZTest assignment
      3. Copy custom_context_memberships_url
      4. Log in as admin
      5. Navigate to Site Administration > Plugins > Manage tools
      6. Click the gear icon on ZTest to edit it
        1. Modify the IMS LTI memberships service to: ‘Do not use this service'
      7. Log in as instructor in the course
      8. Click on ZTest assignment
      9. Verify the custom_context_memberships_url is not present in the launch parameters
      10. Select the AnyCall tab
        1. URL:
          1. paste value of custom_context_memberships_url
        2. Method: GET
        3. Content Type: application/vnd.ims.lis.v2.membershipcontainer+json
        4. Press SEND
      11. Verify denied access:
        1. 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
    • Affected Branches:
      MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-60416_master

      Description

      LTI advantage is a bundle of services and message types put forward by IMS that includes:

      • LTI 1.1 launches
      • Content Item Selection Request (Deep Linking) support
      • Membership service support
      • Assignment and Grade Services

      This card proposes to add to moodle the missing bits to support the expectations of LTI advantage.
      It focuses on:

      1. Allowing services to be available for manually set up tools (site and course). Each service can express a configuration to be added to the external tool configuration form. See https://docs.moodle.org/dev/LTI_Services_on_LTI_1x
      2. Add full support of the Assignment and Grade Services (initially built as a standalone plugin, see https://github.com/CengageEng/moodle-ltiservice_gradebookservices)

      This is currently ongoing validation test with IMS.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  4 Vote for this issue
                  Watchers:
                  13 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/May/18

                    Time Tracking

                    Estimated:
                    Original Estimate - 0 minutes
                    0m
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 4 hours
                    4h