Custom Navigation Link for role

Jump to solution
JosephBarr
Community Member

I've built a custom navigation link using the redirect tool, but I want the link to be available only to teachers.  How might I go about this?

Labels (1)
1 Solution
James
Community Champion

@JosephBarr 

Selecting just teachers isn't an option, but there is way to set the visibility to admins, which  means "course admins" if you're using a course navigation placement and includes teachers and admins. Unfortunately, that option doesn't exist from the redirect tool itself, but you can use the Canvas External Tools API to create a new tool or edit an existing one.

The details depend on where you added the external tool (account, course, or group), but they all function similarly.

Here's what you would do for an existing tool (you've already created the redirect but now want it to just appear to course admins).

  1. Start with List external tools endpoint to get the id of the existing tool.
  2. Use that ID with the Edit an external tool endpoint and PUT the field course_nagivation[visibility]=admins. The course_navigation assumes that you have it in the course navigation menu. There are other locations you can put it, so make sure you choose the correct one. You can tell from step 1 where it is if you're not sure.

How you use the API can be overwhelming if you've never done it before. A quick way for one-off things like this is to get an Access Token from your Account > Settings page and then use the Canvas Live API interface to input the required information. The Canvas Live API is found at <your Canvas instance>/doc/api/live. 

If you have used the API before for other things, then go ahead and use that method.

View solution in original post