cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jborrebach
Community Participant

LTI 1.3, GET results with user_id filter

I'm pretty sure this is a bug in Canvas, and I submitted a ticket for it. Posting it here too in case anyone else runs into it.

We are a tool provider, and want our application to use the LTI 1.3 lineitem/results endpoint, to GET results filtered by a “user_id” query parameter. This is described in the AGS spec at: http://www.imsglobal.org/spec/lti-ags/v2p0/#container-request-filters-0

That appears to work, but ONLY if we set the “user_id” value as the numeric Canvas user ID. That is, the value that comes in an LTI launch with a $User.id custom parameter. I think this is wrong – that the endpoint should accept the LTI user ID in the “user_id” filter (that is, the “sub” value when that user performs an LTI launch), the same one returned as the userId in the result object. That’s the ID that our tool otherwise relies on to identify each user.

Here’s an example from our own test platform.

Failed filter using a student’s LTI user ID:

  • Result service : https://{platform URL}/api/lti/courses/3358366/line_items/48133/results?user_id=7becbc40-9917-460b-bbdd-91150b4e86a5 
  • Response : []

Successful filter using the student’s internal Canvas ID:

  • Result service: https://{platform URL}/api/lti/courses/3358366/line_items/48133/results?user_id=9005059 
  • Response: [ {

"id":"https://{platform URL}/api/lti/courses/3358366/line_items/48133/results/100027", 

"scoreOf":"https://{platform URL}/api/lti/courses/3358366/line_items/48133", 

"userId":"7becbc40-9917-460b-bbdd-91150b4e86a5",

"resultScore":10.0,

"resultMaximum":100.0,

"comment":""

} ]

0 Replies