Hide my courses listing in the navigation menu

Hide my courses listing in the navigation menu

by Frank Black -
Number of replies: 3


> Can you also tell me why only admin can see 'custom menu items' (in the setting above the user menu items box)?
> This also seems like a good feature, but I've never worked out how to get the menus to display for normal users.


Ah! For some reason it's suddenly decided to display.

So, just the second question then: Is it possible to disable or hide the 'My Courses' listing in the nav menu?

Average of ratings: -
In reply to Frank Black

Re: Hide my courses listing in the navigation menu

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

I have just split your second question, Frank, as it is on a different topic. Why do you want to hide the My courses listing?

In reply to Mary Cooch

Re: Hide my courses listing in the navigation menu

by Frank Black -


We take a teacher-centric approach rather than a course-centric approach. I'd rather have a hard-coded menu (html block or custom menu in the theme settings) linking to our 'teacher areas'. You see, each teacher has one course which is their main area for sharing information and resources, which then links to actual subject courses if they really do need a whole course set-up for specific classes. Most don't though - they manage to squeeze all their resources into their one area.

So if the students are looking for information, they tend not to go straight to a subject course first - they go to their teacher's area.


I found the documentation for the Boost theme about preset files. So I am wondering if I can hide the 'draw navigation' completely with some CSS (actually, I might be able to do that in the 'additional html' feature too, without messing about with presets). Then I could put my hard-coded menus on the right hand side.

As a side note - I cannot upload themes to the server, which Is why I'm not just finding a more suitable theme.

In reply to Frank Black

Re: Hide my courses listing in the navigation menu

by Kashmira Nagwekar -

Hiding ‘Navigation’ drawer in Boost

For hiding the drawer in boost theme, we need to follow 2 steps, first we need to hide the drawer section and then suppress the hamburger icon:

  1. The left sidebar is open by default, make it closed by -

A slight code tweak is required in line 31-34 in theme/boost/layout/columns2.php,

Change -

if (isloggedin()) {

  $navdraweropen = (get_user_preferences('drawer-open-nav', 'true') == 'true');

} else {

  $navdraweropen = false;

}

To -

if (isloggedin()) {

  $navdraweropen = false;

} else {

  $navdraweropen = false;

}

Forum discussion link :- https://moodle.org/mod/forum/discuss.php?d=346967


  1. Now, suppress the ‘hamburger’ icon used for toggling the sidebar view -

Add the following code in Site Admin -> Additional HTML -> Within HEAD

<style>

.navbar-nav [data-region="drawer-toggle"] button {

    display: none;

}

</style>

Forum discussion link :- https://moodle.org/mod/forum/discuss.php?d=355612

Note :- It suppresses the drawer section for everyone, even for admin and teachers.