Debugging LTI 1.3 Deep Linking Response Handling

Jump to solution
ascholerCCC
Community Member

I am working on an LTI 1.3 integration and having issues figuring out why nothing seems to happen to Deep Link Response items returned from content selection.

I am successfully launching the content selection from the drop down in the course_assignment_settings_link.

Once content is selected and the form submitted, Canvas briefly displays "Retrieving Content", then the popup closes, and nothing appears to happen.

I can successfully link to the LTI tool when editing an existing assignment by selecting Submission Type: External Tool, selecting the LTI tool and then using the same workflow.

Am I trying to do something that is not possible? Should I expect to be able to add an item to an assignment via that menu?


Using pry, I can see that the data is reaching the route handler deep_linking_response route handler. Within that handler, it ends up in the "content items that don't need resources" branch.
https://github.com/instructure/canvas-lms/blob/fb2ea76d6c0fac57dea56d104dd21239645a9d92/app/controll...

It appears to successfully call ResourceLink.create_with on the resource link that was returned, but there is no sign that anything was actually created in the course


Here is the deep_link_resonse data that is reaching the controller:

 

 :current_context=>
  {:id=>1,
   :name=>"ascholer-test",
   :type=>"Course",
   :url=>"https://canvas.runestoneacademy.org/courses/1"},
 :deep_link_response=>
  {:placement=>"course_assignments_menu",
   :content_items=>
    [{"type"=>"ltiResourceLink",
      "title"=>"werwer",
      "target"=>"window",
      "url"=>"https://rs.ascholer.org/admin/lti1p3/launch",
      "window"=>{"targetName"=>"_runestone"},
      "lineItem"=>
       {"scoreMaximum"=>6,
        "label"=>"werwer",
        "resourceId"=>"26_23",
        "tag"=>"grade"},
      "lookup_uuid"=>"d3da1b3e-803a-40f9-921d-3db6ddaa61a4"},
    ],
   :ltiEndpoint=>
    "https://canvas.runestoneacademy.org/courses/1/external_tools/retrieve",
   :reloadpage=>false,
   :moduleCreated=>false,
   :replaceEditorContents=>false}}

 

 

 

0 Likes
1 Solution
xmoffatt
Instructure
Instructure

Hey!

Adding an assignment from this placement definitely should be doable, and your content item looks like it is constructed well. If you mentioned pry, it sounds like you are developing this locally. I think there are some feature flags that you will need to enable for this to work correctly:

lti_deep_linking_line_items (this is the main one)
lti_deep_linking_module_index_menu_modal (do this one too for good measure)

You can find those in the UI in the Site Admin account Settings > Feature Flags, or do it in a Rails console with `Account.site_admin.enable_feature! :<feature name>`
 
let me know if that fixes it or not! I expect it should start working 🙂
 

View solution in original post

0 Likes