Skip to content

How to set up multiple launch paths? #28

@renaatdemuynck

Description

@renaatdemuynck

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:

<?xml version="1.0" encoding="UTF-8"?>
<cartridge_basiclti_link ...>
    <blti:title>CACCL TEST</blti:title>
    ...
    <blti:launch_url>https://ahs-pre-web-ada-next.azurewebsites.net/canvas/launch</blti:launch_url>
    <blti:extensions platform="canvas.instructure.com">
        <lticm:property name="privacy_level">public</lticm:property>
        <lticm:options name="course_navigation">
            <lticm:property name="url">https://xxxxx.azurewebsites.net/course</lticm:property>
            <lticm:property name="text">CACCL TEST</lticm:property>
            <lticm:property name="visibility">public</lticm:property>
            <lticm:property name="default">enabled</lticm:property>
            <lticm:property name="enabled">true</lticm:property>
        </lticm:options>
        <lticm:options name="account_navigation">
            <lticm:property name="url">https://xxxxx.azurewebsites.net/admin</lticm:property>
            <lticm:property name="text">CACCL TEST</lticm:property>
            <lticm:property name="enabled">true</lticm:property>
        </lticm:options>
        <lticm:options name="user_navigation">
            <lticm:property name="url">https://xxxxx.azurewebsites.net/user</lticm:property>
            <lticm:property name="text">CACCL TEST</lticm:property>
            <lticm:property name="enabled">true</lticm:property>
        </lticm:options>
    </blti:extensions>
    ...
</cartridge_basiclti_link>

The course, user and admin routes are correctly set up in my app, but if I click the link in the (sub)account navigation, I get this error:

Cannot POST /admin

I tried several variations of the launch URL (e.g., /canvas/launch/admin), but without success.
In development, I used this config:

{
    ...
    "customLaunchPaths": [
        {
            "name": "Course Launch",
            "path": "/course"
        },
        {
            "name": "User Launch",
            "path": "/user"
        },
        {
            "name": "Admin Launch",
            "path": "/admin"
        }
    ]
}

How do I configure this correctly for a production environment? Could you please point me in the right direction?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions