LTI Development: Student Context Card Placement (student_context_card)
I'm interested in adding a new placement on the Student Context Card for our LTI. However, the student ID is not available in the LTI launch POST data. I'm not seeing a suitable variable substitution either ...
I see that a student ID is passed in the LTI iframe URL, Ex.: `courses/163778/external_tools/370481?launch_type=student_context_card&student_id=709190`
However, AFAIK, the student ID is not available to LTI developers as it is not included in the launch data and we don't have access to the parent window's URL.
How can I get the student context for the student_context_card embedded LTI. This would not be the same value as the launching user context.
I think support for the student context card placement was added in this commit: https://github.com/instructure/canvas-lms/commit/34fd027d7ad7a742c0f75bdbc18db95ac22a169a
If you are doing a LTI 1.1 launch then you should get the ID of the student in the parameter "ext_lti_student_id" however if you are doing a LTI 1.3 launch the I don't think this is passed across.
Canvas should be also passing across the student ID in LTI 1.3 launches, I would expect this to get fixed at some point as New Analytics uses it and at some point will probably move to LTI 1.3 (no idea on timeline), and when it does Instructure will need to have the student ID if they want to continue to support this functionality.
It might make sense to have this information passed across in the context but at the moment there doesn't seem to be a context in the LTI specification that would work: https://www.imsglobal.org/spec/lti/v1p3#context-type-vocabulary
Thanks for the update Matt. That code commit link was helpful. I am indeed trying to write this in LTI 1.3. We'll hold off on placing our LTI link on the Student Card for now.
FWIW, a replacement variable would work fine; we have com.instructure.Assignment.lti.id and Canvas.assignment.id ... something like Canvas.student.id would work for us.