Open renaatdemuynck opened 1 year ago
Just found out that when I click on the extra Choose Path
buttons, before I click on the button for the Home
path, It isn't handled as an LTI launch (status.launched
is FALSE).
On the otherhand, if I choose Home
first, subsequent clicks on the other paths do work.
Hi @renaatdemuynck
Due to the way that LTI apps are registered in Canvas (not all apps are registered, only the ones with API access), CACCL is designed to only support one launch path. The standard way of having multiple ways of launching the tool is to provide a custom parameter.
To see how these custom parameters are added, check out this lti xml builder form and use the "custom fields" area: https://www.edu-apps.org/build_xml.html
All variations of the app will still use the same launch path, but use different custom fields. For example, you could have a custom field called "type" that could have values "course" or "user" or "admin".
Once the app is launched, the launchInfo
object will automatically contain a map called customParams
which is a key/value map of custom parameters. Here's a link to the launchInfo docs:
https://github.com/harvard-edtech/caccl-lti/blob/main/docs/LaunchInfo.md
I hope this helps!
Gabe
P.S. The custom launch paths field that you found for the dev environment is actually for a separate purpose. For self-launched apps, the user flow starts with visiting an unauthenticated path (e.g. /home/tutorials) which probably would log the user's destination, perform a self-launch, and then upon launch, redirect the user to the place they were trying to go. This doesn't seem to be the launch process that you're going for, so I would actually fully remove those custom launch paths.
Hello @gabeabrams, I added my app to Canvas, but I need multiple launch paths (course, user & admin). How do I do this? I have this in my
config.xml
:The
course
,user
andadmin
routes are correctly set up in my app, but if I click the link in the (sub)account navigation, I get this error:I tried several variations of the launch URL (e.g.,
/canvas/launch/admin
), but without success. In development, I used this config:How do I configure this correctly for a production environment? Could you please point me in the right direction?