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

Ability to pass through specific LTI roles to tool provider

Details

    • MOODLE_39_STABLE, MOODLE_400_STABLE
    • MDL-72066_master
    • Hide
      1. Apply this extra commit to provide some test fixtures: https://github.com/marxjohnson/moodle/commit/17c057fa056ba811868e870a7f34faa0695a70df
      2. Log in as admin
      3. Ensure you have $CFG->debug set to DEBUG_DEVELOPER
      4. Create a course called "Test Course 1"
      5. Enrol 4 users on the course. 1 Student, 1 Teacher, 1 Non-editing teacher, 1 Manager.
      6. Go to Site Administration > Plugins > Activity modules > External tool > Manage tools
      7. Follow "configure a tool manually", and create a tool with the following settings:
      8. Save the tool
      9. Follow "configure a tool manually", and create a second tool with the following settings:
      10. Save the tool.
      11. Go to "Test course 1" and add a new External Tool activity.
      12. Set the name to "Test LTI 1.0 roles provider" and select "LTI 1.0 roles provider" from the list of preconfigured tools.
      13. Save and return to course.
      14. Add another External Tool activity.
      15. Set the name to "Test LTI 1.3 roles provider" and select "LTI 1.3 roles provider" from the list of preconfigured tools.
      16. Log in as each of the enrolled users, visit the "Test LTI 1.0 roles provider" and "Test LTI 1.3 roles provider" activities in turn. You should see a message "The LTI provider received the following roles for the current user:" and the corresponding LTI role for the user's role archetype:
      17. Log back in as admin
      18. In Site Administration > Users > Permissions > Define roles, Add a new role:
        • No defaults or preset
        • Short name: ltideveloper
        • Full name: LTI Content Developer
        • Context types where this role may be assigned: Course
        • Capabilities: mod/lti:view, mod/lti:contentdeveloper
      19. Enrol a 5th user to "Test course 1" and grant them the "LTI Content Developer" role.
      20. Log in as the "LTI Content Developer" user, and visit the "Test LTI 1.0 roles provider" and "Test LTI 1.3 roles provider" activities in turn.
      21. You should see the corresponding role on each activity:
      22. Log back in as admin and return to "Test Course 1"
      23. Turn editing mode on and select "Permissions" from the "Test roles provider" action menu
      24. Filter permissions by mod/lti.
      25. Add "Non-editing teacher" to the "Prohibited" roles for the capability mod/lti:teachingassistant.
      26. Add "Non-editing teacher" to "Roles with this capability" for the capability mod/lti:mentor.
      27. Log in as the Non-editing teacher user and and visit the "Test LTI 1.0 roles provider" and "Test LTI 1.3 roles provider" activities in turn.
      28. You should see the corresponding role on each activity:
      29. You should not see the urn:lti:role:ims/lis/TeachingAssistant or http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistant on either activity.
      Show
      Apply this extra commit to provide some test fixtures: https://github.com/marxjohnson/moodle/commit/17c057fa056ba811868e870a7f34faa0695a70df Log in as admin Ensure you have $CFG->debug set to DEBUG_DEVELOPER Create a course called "Test Course 1" Enrol 4 users on the course. 1 Student, 1 Teacher, 1 Non-editing teacher, 1 Manager. Go to Site Administration > Plugins > Activity modules > External tool > Manage tools Follow "configure a tool manually", and create a tool with the following settings: Tool name: "LTI 1.0 roles provider" Tool URL: " http://moodle.example.com /mod/lti/tests/fixtures/roles_provider.php" where http://moodle.example.com/ is your site's wwwroot. Leave all other settings as default. Save the tool Follow "configure a tool manually", and create a second tool with the following settings: Tool name: "LTI 1.3 roles provider" Tool URL: " http://moodle.example.com /mod/lti/tests/fixtures/roles_provider_1p3.php" where http://moodle.example.com/ is your site's wwwroot. LTI version: "LTI 1.3"  Initiate login URL: " http://moodle.example.com /mod/lti/tests/fixtures/login_initiator.php" where http://moodle.example.com is your site's wwwroot. Save the tool. Go to "Test course 1" and add a new External Tool activity. Set the name to "Test LTI 1.0 roles provider" and select "LTI 1.0 roles provider" from the list of preconfigured tools. Save and return to course. Add another External Tool activity. Set the name to "Test LTI 1.3 roles provider" and select "LTI 1.3 roles provider" from the list of preconfigured tools. Log in as each of the enrolled users, visit the "Test LTI 1.0 roles provider" and "Test LTI 1.3 roles provider" activities in turn. You should see a message "The LTI provider received the following roles for the current user:" and the corresponding LTI role for the user's role archetype: Student 1.0: urn:lti:role:ims/lis/Learner 1.3: http://purl.imsglobal.org/vocab/lis/v2/membership#Learner Teacher 1.0: urn:lti:role:ims/lis/Instructor 1.3: http://purl.imsglobal.org/vocab/lis/v2/membership#Instructor Non-editing teacher 1.0: urn:lti:role:ims/lis/TeachingAssistant 1.3: http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistant Manager 1.0: urn:lti:role:ims/lis/Manager 1.3: http://purl.imsglobal.org/vocab/lis/v2/membership#Manager Log back in as admin In Site Administration > Users > Permissions > Define roles, Add a new role: No defaults or preset Short name: ltideveloper Full name: LTI Content Developer Context types where this role may be assigned: Course Capabilities: mod/lti:view, mod/lti:contentdeveloper Enrol a 5th user to "Test course 1" and grant them the "LTI Content Developer" role. Log in as the "LTI Content Developer" user, and visit the "Test LTI 1.0 roles provider" and "Test LTI 1.3 roles provider" activities in turn. You should see the corresponding role on each activity: 1.0: urn:lti:role:ims/lis/ContentDeveloper 1.3: http://purl.imsglobal.org/vocab/lis/v2/membership#ContentDeveloper Log back in as admin and return to "Test Course 1" Turn editing mode on and select "Permissions" from the "Test roles provider" action menu Filter permissions by mod/lti. Add "Non-editing teacher" to the "Prohibited" roles for the capability mod/lti:teachingassistant. Add "Non-editing teacher" to "Roles with this capability" for the capability mod/lti:mentor. Log in as the Non-editing teacher user and and visit the "Test LTI 1.0 roles provider" and "Test LTI 1.3 roles provider" activities in turn. You should see the corresponding role on each activity: 1.0: urn:lti:role:ims/lis/Mentor 1.3: http://purl.imsglobal.org/vocab/lis/v2/membership#Mentor You should not see the urn:lti:role:ims/lis/TeachingAssistant or http://purl.imsglobal.org/vocab/lis/v2/membership/Instructor#TeachingAssistant on either activity.

    Description

      At the moment Moodle only passes through 3 types of roles

      https://github.com/moodle/moodle/blob/master/mod/lti/locallib.php#L2144-L2179

      Admin

      Instructor

      Learner

      This reduces the functionality when interacting with an external system who have specific permissions for specific roles

      For example echo360 has 4 roles that can be mapped to. Admin, Instructor, Teaching Assistant, and Student

      https://integration.echo360.com/hc/en-us/articles/360035037892-LMS-to-Echo360-User-Role-Mappings

       

      There should be the ability for Moodle to be able to pass a specific LTI role such as urn:lti:role:ims/lis/teachingassistant so its mapped correctly with the tool provider.

      Full list of LTI roles from the spec:

      https://www.imsglobal.org/specs/ltiv1p1p1/implementation-guide#toc-8

       

      Attachments

        Issue Links

          Activity

            People

              marxjohnson Mark Johnson
              cceaean Ehsan
              Jake Dallimore Jake Dallimore
              Votes:
              17 Vote for this issue
              Watchers:
              23 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 10 minutes
                  2h 10m

                  Clockify

                    Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.