Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-69233

Support for LTI Course Group Service

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      For LTI 1.3

      Register test tool

      1. Log into Moodle as a system administrator and navigate to the Manage tools page in the Site Administation: Plugins area (/mod/lti/toolconfigure.php)
      2. Enter https://saltire.lti.app/tool as the Tool URL and click on the "Add LTI Advantage" button
      3. Click on the "Continue" button
      4. Once the tool has been registered, click on the "Close" button
      5. For the newly registered tool, click on the "Activate" button
      6. Click on the "Edit" icon and change the tool configuration usage to "Show in activity chooser and as a preconfigured tool" and the default launch container to "New window"
      7. Add a custom parameter of "groups=$Membership.course.groupIds"
      8. Click on the "Save changes" button

      Add tool to course

      1. Log into Moodle as an instructor and navigate to a course
      2. Turn editing on
      3. Click on the "Add an activity or resource" link and select the newly registered tool
      4. Enter a name for the item
      5. Click on the "Save and return to course" button

      Test Course Groups service

      1. Log into Moodle as an instructor and navigate to the course used above
      2. Ensure the course has groups and groupings defined and users assigned to the groups
      3. Click on the link created above to launch the newly registered tool
      4. Check the JWT section and ensure it contains a "groups" element within the "https://purl.imsglobal.org/spec/lti/claim/custom" claim with a value of the group IDs for which the user is a member.
      5. Select "OAuth 2 Access Token" from the Service dropdown list on the page header
      6. Check the box against the "https://purl.imsglobal.org/spec/lti-gs/scope/contextgroup.readonly" scope
      7. Click on the "Request new token" button
      8. Click "No" if offered to view the service request
      9. Select "Course Groups" from the Service dropdown list on the page header
      10. Click on the "Read" button and select "Yes" to view the service request
      11. Select the "Formatted response body" tab to review the group information provided by Moodle
      12. Click on the "Close" button to close the service request view
      13. Select a format of "Group sets" and repeat the last 3 steps to check the group set information provided by Moodle
      14. Check the "Filter by user ID?" box and enter a user ID and then send read requests for group and group set information and check the response has been limited to those entities associated with the user
      15. Change the value of the "Limit" field and repeat the read requests for group and group set information and check that the number of responses is limited to the number requested and use the "Next page" button to request the next pages until all items have been received

      The above tests can be repeated for a course which has no groups or groupings defined.

      Test Names and Role Provisioning service

      1. Log into Moodle as an instructor and navigate to the course used above
      2. Ensure the course has groups and groupings defined and users assigned to the groups
      3. Click on the link created above to launch the newly registered tool
      4. Select "OAuth 2 Access Token" from the Service dropdown list on the page header
      5. Check the box against the "https://purl.imsglobal.org/spec/lti-nrps/scope/contextmembership.readonly" scope
      6. Click on the "Request new token" button
      7. Click "No" if offered to view the service request
      8. Select "Names and Role Provisioning service" from the Service dropdown list on the page header
      9. Click on the "Read" button and select "Yes" to view the service request
      10. Select the "Formatted response body" tab to check that the member information provided by Moodle does NOT include and group information
      11. Check the "Include group information?" box and repeat the last 2 steps checking that the response now includes group enrollment information for each user

      The above tests can be repeated for a course which has no groups or groupings defined.

      Tidy up

      1. Delete the link(s) added to course(s)
      2. Delete the tool registration

      For LTI 1.0/1.1

      Register test tool

      1. Log into Moodle as a system administrator and navigate to the Manage tools page in the Site Administation: Plugins area (/mod/lti/toolconfigure.php)
      2. Click on the "configure a tool manually" link
      3. Enter a tool name; e.g. "Course Groups Test"
      4. Enter https://saltire.lti.app/tool as the Tool URL
      5. Enter a consumer key; e.g. "moodle"
      6. Enter a shared secret of "secret"
      7. Add a custom parameter of "groups=$Membership.course.groupIds"
      8. Select a tool configuration usage value of "Show in activity chooser and as a preconfigured tool"
      9. Select a default launch container value of "New window"
      10. In the Services section, select a value of "Use this service to retrieve members' information as per privacy settings" for the "IMS LTI Names and Role Provisioning (including Course Groups)" entry
      11. Click on the "Save changes" button

      Run tests by adding the tool to a course (see above) and repeating the above tests for the Course Groups and Names and Role Provisioning services, omitting the steps to obtain an access token.  The message parameters should include one named "custom_groups" with a value of the group IDs for which the user is a member..

      Follow the tidy up steps listed above.

       

      Show
      For LTI 1.3 Register test tool Log into Moodle as a system administrator and navigate to the Manage tools page in the Site Administation: Plugins area (/mod/lti/toolconfigure.php) Enter https://saltire.lti.app/tool as the Tool URL and click on the "Add LTI Advantage" button Click on the "Continue" button Once the tool has been registered, click on the "Close" button For the newly registered tool, click on the "Activate" button Click on the "Edit" icon and change the tool configuration usage to "Show in activity chooser and as a preconfigured tool" and the default launch container to "New window" Add a custom parameter of "groups=$Membership.course.groupIds" Click on the "Save changes" button Add tool to course Log into Moodle as an instructor and navigate to a course Turn editing on Click on the "Add an activity or resource" link and select the newly registered tool Enter a name for the item Click on the "Save and return to course" button Test Course Groups service Log into Moodle as an instructor and navigate to the course used above Ensure the course has groups and groupings defined and users assigned to the groups Click on the link created above to launch the newly registered tool Check the JWT section and ensure it contains a "groups" element within the "https://purl.imsglobal.org/spec/lti/claim/custom" claim with a value of the group IDs for which the user is a member. Select "OAuth 2 Access Token" from the Service dropdown list on the page header Check the box against the "https://purl.imsglobal.org/spec/lti-gs/scope/contextgroup.readonly" scope Click on the "Request new token" button Click "No" if offered to view the service request Select "Course Groups" from the Service dropdown list on the page header Click on the "Read" button and select "Yes" to view the service request Select the "Formatted response body" tab to review the group information provided by Moodle Click on the "Close" button to close the service request view Select a format of "Group sets" and repeat the last 3 steps to check the group set information provided by Moodle Check the "Filter by user ID?" box and enter a user ID and then send read requests for group and group set information and check the response has been limited to those entities associated with the user Change the value of the "Limit" field and repeat the read requests for group and group set information and check that the number of responses is limited to the number requested and use the "Next page" button to request the next pages until all items have been received The above tests can be repeated for a course which has no groups or groupings defined. Test Names and Role Provisioning service Log into Moodle as an instructor and navigate to the course used above Ensure the course has groups and groupings defined and users assigned to the groups Click on the link created above to launch the newly registered tool Select "OAuth 2 Access Token" from the Service dropdown list on the page header Check the box against the "https://purl.imsglobal.org/spec/lti-nrps/scope/contextmembership.readonly" scope Click on the "Request new token" button Click "No" if offered to view the service request Select "Names and Role Provisioning service" from the Service dropdown list on the page header Click on the "Read" button and select "Yes" to view the service request Select the "Formatted response body" tab to check that the member information provided by Moodle does NOT include and group information Check the "Include group information?" box and repeat the last 2 steps checking that the response now includes group enrollment information for each user The above tests can be repeated for a course which has no groups or groupings defined. Tidy up Delete the link(s) added to course(s) Delete the tool registration For LTI 1.0/1.1 Register test tool Log into Moodle as a system administrator and navigate to the Manage tools page in the Site Administation: Plugins area (/mod/lti/toolconfigure.php) Click on the "configure a tool manually" link Enter a tool name; e.g. "Course Groups Test" Enter https://saltire.lti.app/tool as the Tool URL Enter a consumer key; e.g. "moodle" Enter a shared secret of "secret" Add a custom parameter of "groups=$Membership.course.groupIds" Select a tool configuration usage value of "Show in activity chooser and as a preconfigured tool" Select a default launch container value of "New window" In the Services section, select a value of "Use this service to retrieve members' information as per privacy settings" for the "IMS LTI Names and Role Provisioning (including Course Groups)" entry Click on the "Save changes" button Run tests by adding the tool to a course (see above) and repeating the above tests for the Course Groups and Names and Role Provisioning services, omitting the steps to obtain an access token.  The message parameters should include one named "custom_groups" with a value of the group IDs for which the user is a member.. Follow the tidy up steps listed above.  
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_400_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      IMS Global has published a candidate final of the Course Groups service: https://www.imsglobal.org/spec/lti-gs/v1p0 (available to IMS members only).

      It's a simple group service allowing a tool to discover the groups created in a course and enriches the names and role provisioning service to optionally include group memberships.

      This card is to cover the implementation of this service in Moodle.

      Given the close association between this service and the existing names and role provisioning service, it is being implemented as a part of the latter and shares the same configuration setting,  That is, if the names and role provisioning service is enabled, access to group information will also be made available.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              svickers Stephen Vickers
              Reporter:
              claudevervoort Claude Vervoort
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Fix Release Date:
                13/Dec/21