tl-its-umich-edu / canvas-app-explorer

A Web application that presents a list of Canvas external (LTI) tools with details. When integrated within Canvas, the user can search for specific LTI tool(s), and add or remove those tools from Canvas courses.
Apache License 2.0
4 stars 6 forks source link

Allow for presentation of LTI tools without a Course Navigation placement #198

Open ssciolla opened 2 years ago

ssciolla commented 2 years ago

Right now, we filter out tools that don't have a Tab in the course context with a matching Canvas ID. This results in tools that don't have Course Navigation as a placement getting filtered out. Ideally, these would still be shown but the Add/Remove button on the card would be hidden (and maybe some other kind of label would be present).

I think we could change the filtering to not exclude these, change the LtiToolWithNavSerializer such that it allows for a none value and is more specific about the type of navigation enabled, and then make the button rendering be conditional in the frontend. I'm imagining the serializer would end up having something like this.

# For when it has a Course Navigation placement
{
  course_navigation: {
    enabled: true (or false)
  }
}

# For when it doesn't
{
  course_navigation: null
}