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

Message in Membership Service not in an Array

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Configure NGrok
      2. Login as an Administrator:
      3. Visit 'Site administration' > 'Plugins' > 'Activity modules' > 'External tool' > 'Manage tools'
      4. Select configure a tool manually
      5. Create the tool:
        1. name: ZTest
        2. Tool URL: https://ztest.cengage.info/ztest/lti11
        3. Consumer Key: Ztest-Moodle (value does not actually matters)
        4. Shared Secret: ztest-secret
        5. Privacy: set all options to Always
        6. Services: enable IMS LTI membership
      6. As an instructor go to a test course
        1. Turn editing on
        2. Add an Activity or Resource > External tool
        3. Name: ZTest Link 1
        4. Preconfigured tool: ZTest
        5. Save and Display
        6. From the list of parameters shown in the ZTest page, copy the value of:
          1. custom_context_memberships_url; and
          2. resource_link_id
        7. Go to Any Call tab
        8. Enter:
          1. URL: paste the value from custom_context_memberships_url and add at the end ?rlid=<value of resource_link_id>
          2. method: GET
          3. content-type: application/vnd.ims.lis.v2.membershipcontainer+json
        9. Execute the query
          1. Verify that for each membership record, there is a message attribute
          2. Verify thateach message attribute takes the form:

            "message" : [
                {
                    "message_type" : "basic-lti-launch-request",
                    "lis_result_sourcedid" : "..."
                }
            ]
            

      Show
      Configure NGrok Login as an Administrator: Visit 'Site administration' > 'Plugins' > 'Activity modules' > 'External tool' > 'Manage tools' Select configure a tool manually Create the tool: name: ZTest Tool URL: https://ztest.cengage.info/ztest/lti11 Consumer Key: Ztest-Moodle (value does not actually matters) Shared Secret: ztest-secret Privacy: set all options to Always Services: enable IMS LTI membership As an instructor go to a test course Turn editing on Add an Activity or Resource > External tool Name: ZTest Link 1 Preconfigured tool: ZTest Save and Display From the list of parameters shown in the ZTest page, copy the value of: custom_context_memberships_url ; and resource_link_id Go to Any Call tab Enter: URL: paste the value from custom_context_memberships_url and add at the end ?rlid=<value of resource_link_id> method: GET content-type:  application/vnd.ims.lis.v2.membershipcontainer+json Execute the query Verify that for each membership record, there is a message attribute Verify thateach message attribute takes the form: "message" : [ { "message_type" : "basic-lti-launch-request", "lis_result_sourcedid" : "..." } ]
    • Affected Branches:
      MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
    • Pull Master Branch:
      MDL-62993_master

      Description

      Current implementation of membership service when queried for a given link id (rlid=...) will include a message attribute which can be used to get the lis_result_sourcedid for that link and user combination. The message object is directly included as the JSON Object value:

      "message" : {
           "message_type" : "basic-lti-launch-request",
           "lis_result_sourcedid" : "..."}

      The IMS Memberships specification however expects the message Object, even if there is only one value possible for now, to always be in an array: https://www.imsglobal.org/specs/ltimemv1p0/specification-3

      "message" : [
       {
           "message_type" : "basic-lti-launch-request",
           "lis_result_sourcedid" : "..."
      }
       ]
      

       

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Sep/18