Closed arthurian closed 2 years ago
@arthurian : This one I think would definitely require us sitting down together and walking through it. At the same time, this does not look like something we would be using at all on our end, so I don't think there would be a problem merging it from your end if we can't get a meeting set up before your cut-off date.
This PR provides instructors with a way to embed/insert an annotation assignment object in a Canvas page using the rich content editor. This is something that we know GSE courses have attempted to do in the past manually. Here's a brief demo of how the functionality works.
Changes:
ContentItemSelectionRequest
.middleware.py
to validate aContentItemSelectionRequest
message which is similar to an LTI launch message. This triggers the LTI Content Item Selection Request Workflow (spec).embed_lti
andembed_lti_response
that allow the user to select an annotation object and insert it as an LTI link in the content.EmbedLtiSelectionForm
andEmbedLtiResponseForm
to support the selection of content items and the oauth-signed POST back to the LMS with the selected item.collection_id
andobject_id
as custom GET parameters in addition to POST parameters, which will route directly to the annotation view.Limitations:
launch_lti
view.resource_link_id == context_id
wherecontext_id
is the course-level identifier. This means we can't use the starting resource configuration method of routing learners to a particular assignment object like we do with module items, but instead must pass the assignment and target IDs directly as parameters (collection_id
andobject_id
).notifications
app identifies websocket channels using a combination of(context_id,collection_id,object_id)
, the middleware checks these values against the session, which assumes theresource_link_id
has partitioned the sessions, except it hasn't in this context. So this can result in 403 responses.To test in Canvas:
@lduarte1991 @nmaekawa Let me know if you want to walk through this together since this is a large PR.