[ARCHIVED] Is it possible to hide native (not external tools) course navigation links by default? eg. the Files menu link.

Jump to solution
leon_huang
Community Explorer

We want to make some navigation links hidden by default when the course is created. Not external LTI's - as we can do that by XML. An example is the Files link we want to hide it by default. Any ideas?

Labels (2)
1 Solution
phanley
Community Contributor

You can do it with the Tabs API, and the id of the default tabs looks consistent (i.e. you get the files tab with  `/courses/{course_id}/tabs/files`)

So you can do the update in one step (per class):

curl -X PUT  "https://{canvas_url}/api/v1/courses/{course_id}/tabs/files" -F "hidden=true"  -H "Authorization: Bearer {SUPERSECRET}"  | jq --raw-output

which for the course I tested it with returned: 

{
  "id": "files",
  "html_url": "/courses/28241/files",
  "full_url": "https://templeu.instructure.com/courses/28241/files",
  "position": 4,
  "hidden": true,
  "visibility": "admins",
  "label": "Files",
  "type": "internal"
}

It seems worth pointing out -- I'm pretty sure that that the link will just greyed out for Teachers, not invisible  (alas, I tried  -F "enabled=false" and  -F "visibility=false" just to see, but they didn't have any effect -- I'm guessing that disabling the tool would break the course files functionality, not just hide the link entirely).

View solution in original post