qnguyen
Community Contributor

Hide PEOPLE tab for all courses

Hi all,

Is there a a way to hide PEOPLE tab for all courses as default?

I have been using the API Live but that only work for 1 course at a time.

Thanks

Labels (4)
7 Replies
robotcars
Community Champion

Unless Canvas Developers‌, can think of anything else, other than automating an API task for all courses, I think CSS or JavaScript is the only way.

James
Community Champion

I like Robert's solution the best. You can automate the process using the Tabs API to remove it from the course navigation menu, but it still shows up for instructors, who could benefit greatly from all the things that are under the People tab (like my tool to download the access report for all students).

wojcika
Community Participant

Hi!

Does anyone have the JS for this? I was able to hide it from the course menu but would like to also disable in the course navigation. 

0 Kudos

@wojcika 

If you just looking to hide the People link from the course navigation in all courses, you could try using the following CSS code to see if it meets your needs:

 

nav[role="navigation"] a.people,
nav#mobileContextNavContainer a[href$="/users"] {
  display: none;
}

 

Keep in mind, custom CSS and/or JavaScript can limit the ease of access to this, but it wouldn't be 100% effective.

I would also recommend checking the mobile apps to see if it appears in the mobile app.  If so, this is good to be aware of since you likely won't be able to use any CSS or JavaScript to hide it.  Unfortunately, customizations for mobile apps is very limited.

Hi!

Thank you so much for the reply. I have added a screen shot to show what we are trying to hide/disable. I used this JS in the theme to hide it from the menu but it still appears as an enabled item in the navigation menu items. 

$(document).ready(function(){
$('a.people').hide();
});
 

 

0 Kudos

Hello @wojcika,

@James makes an excellent point that the People page can be a valuable resource for information to instructors.  You could develop a script to make the Tabs API call multiple times to disable it in all courses, or you could use a tool like Postman Runner to repeat the API call for you.  Even if you still want it fully hidden, it would be good to also use this API to ensure it is fully hidden from students even if the theme customizations don't load.

If you do still want to hide it fully from everyone, here is some CSS that could hide it from the settings page too.  I think the id number is the same for everyone, but you may want to test this to confirm:

ul.nav_list li#nav_edit_tab_id_6 {
  display: none;
}

 

Also, make sure you are checking the mobile view of Canvas on desktop since the way the navigation menu shows and loads in mobile view (small browser window width) changes.  Only hiding the "a.people" won't hide it from the mobile view course navigation menu.

 

jerry_nguyen
Community Contributor

@wojcika 

I have developed a script that can call API multiple times, you just need to supply the list of course ID (which you can get from Provisioning report)

  1. Enter list of course ID
  2. Change the URL to your Canvas
  3. Enter your API Token (How to get it)
  4. Change it to TRUE if you wanted to make it visible again
  5. Then hit RUN

Canvas_VBA_Tool.jpg

I have prefilled this Excel spreadsheet for hiding the People tab. However, this spreadsheet can be used to run any Canvas API listed here https://api.instructure.com/

 

0 Kudos