Hide my courses listing in the navigation menu

Re: Hide my courses listing in the navigation menu

by Kashmira Nagwekar -
Number of replies: 0

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.
La media da valetaziuns: -