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

Issue retrieving user information (name and email) from the membership service with an LTI 2.0 tool provider

    XMLWordPrintable

Details

    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • MOODLE_35_STABLE
    • MDL-62988_master
    • Hide
      1. Download ngrok if you don't have it from https://ngrok.com/.
      2. Run ngrok (eg. ./ngrok http 80 --region=au).
      3. Change your wwwroot to use the https URL.
      4. Add $CFG->sslproxy = true to your config.php.
      5. Visit 'Site administration' > 'Plugins' > 'Activity modules' > 'External tool' > 'Manage tools'.
      6. Paste 'https://lti.tools/test/tp.php' into the Add Tool input.
      7. Click 'Add'.
      8. In the tool registration settings, click 'Registration'.
      9. Select all 'Enabled capabilities'.
      10. Select all 'Tool services'.
      11. Click 'Register tool'.
      12. Click 'Yes' to accept the request for data.
      13. Visit a course.
      14. Add an 'External tool' activity.
      15. Select the tool you added in the 'Preconfigured tool' drop-down.
      16. Click 'Save and return to course'.
      17. Click on the activity you added.
      18. In the tool provider page, click 'Membership'.
      19. Click 'Read'.
      20. In the response contained in the modal, ensure that the attributes userId, sourcedId, name, givenName, familyName and email are returned for each course participant. It may be helpful to copy and paste the response body into text editor to make reading easier.
      Show
      Download ngrok if you don't have it from https://ngrok.com/ . Run ngrok (eg. ./ngrok http 80 --region=au). Change your wwwroot to use the https URL. Add $CFG->sslproxy = true to your config.php. Visit 'Site administration' > 'Plugins' > 'Activity modules' > 'External tool' > 'Manage tools'. Paste 'https://lti.tools/test/tp.php' into the Add Tool input. Click 'Add'. In the tool registration settings, click 'Registration'. Select all 'Enabled capabilities'. Select all 'Tool services'. Click 'Register tool'. Click 'Yes' to accept the request for data. Visit a course. Add an 'External tool' activity. Select the tool you added in the 'Preconfigured tool' drop-down. Click 'Save and return to course'. Click on the activity you added. In the tool provider page, click 'Membership'. Click 'Read'. In the response contained in the modal, ensure that the attributes userId, sourcedId, name, givenName, familyName and email are returned for each course participant. It may be helpful to copy and paste the response body into text editor to make reading easier.

    Description

      When using MoodleCloud (Moodle 3.5) and the LTI testing tool (https://lti.tools/test/tp.php) and registering the testing tool as a LTI 2.0 provider and including all possible services and capabilities in the contract the user information is not returned.

      This happens when I use the ToolProxyBinding.memberships.url to fetch the memberships. I am missing the person information and the message. Here is a sample response from the membership service.

      {
         "@context":"http:\/\/purl.imsglobal.org\/ctx\/lis\/v2\/MembershipContainer",
         "@type":"Page",
         "@id":"https:\/\/[redacted].moodlecloud.com\/mod\/lti\/services.php\/CourseSection\/[redacted]\/bindings\/[redacted]\/memberships",
         "pageOf":{
            "@type":"LISMembershipContainer",
            "membershipSubject":{
               "@type":"Context",
               "contextId":"2",
               "membership":[
                  {
       
                     "status":"Active",
                     "role":[
                        "Instructor",
                        "http:\/\/purl.imsglobal.org\/vocab\/lis\/v2\/person#Administrator"
                     ],
                     "member":{
                        "@type":"LISPerson"
                     }
                  },
                  {
                     "status":"Active",
                     "role":[
                        "Learner"
                     ],
                     "member":{
                        "@type":"LISPerson"
                     }
                  }
               ]
            }
         }
      }
      

      Attachments

        Issue Links

          Activity

            People

              corybuecker Cory Buecker
              markn Mark Nelson
              Mark Nelson Mark Nelson
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Janelle Barcega Janelle Barcega
              Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/Jan/19

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h