Your Community is getting an upgrade!
Read about our partnership with Higher Logic and how we will build the next generation of the Instructure Community.
Found this content helpful? Log in or sign up to leave a like!
Hi,
I've successfully used LTI 1.3 with an app that I've created and am hoping to improve the user experience by making use of Canvas' API. As par of the LTI 1.3 flow (when creating an assignment and without the API) the app needs to be configured:
if ($launch->is_deep_link_launch()) {
dd("Deep link launch");
//this configures the Deep Link
$resource = LTI\LTI_Deep_Link_Resource::new()
->set_url($url)
->set_title('Some title');
$launch->get_deep_link()
->output_response_form([$resource]);
exit;
}
This process occurs when the user selects the External Tool from the selection of external tools within an assignment. I was hoping that this could done via the API as well so that I can get the resource link id of the deep linked resource. However, I'm not seeing how I can do this via the API.
Is there a way to do this via the API?
Any guidance would be appreciated.
Thank you,
Eric
Hi @kreut,
Since I've not written my own LTI 1.3 tools, I might be off base here. Are you saying that you want users to launch your LTI, then create an assignment within your tool, and that your platform would then use the Canvas API to create a corresponding assignment on the Canvas side?
If so, this seems a little backward to me as compared to other platforms. From my experience with other LTIs, the user would typically create a Canvas assignment first, selecting the External Tool submission type. They would then choose your tool from the list of installed LTIs and continue to build the assignment within your platform. This way, the Canvas context already exists and can be passed to you when your tool is launched.
But perhaps I misunderstand. I'm eager to learn more about creating my own LTI tools and might be over my head!
Hi @sendres,
I appreciate your response and I can understand your workflow. The issue is that my tool is complicated by the fact that users have to link up particular Canvas assignments to particular assignments on my own tool (the tool has a course/assignment structure).
And, if it helps others, I did find a solution. Basically I used variable solution in the LTI launch (https://canvas.instructure.com/doc/api/file.tools_variable_substitutions.html) to include the Canvas assignment id. Then, when a user creates an assignment on my side, I use the API to create an assignment on Canvas, saving the Canvas assignment id to my database. Next when the launch happens, I use:
$launch->get_launch_data()['https://purl.imsglobal.org/spec/lti/claim/custom']
to get the Canvas assignment id which is passed in by Canvas. Finally, knowing the Canvas assignment id, I can look up the assignment id for my tool and launch the appropriate page. The benefit of this approach is that the user can just create assignments using my tool and things will automatically be set up on Canvas for them.
To interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign InTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign In