General developer forum

Hide Calendar in menu

 
Picture of Isaac Wong
Hide Calendar in menu
 

Hi everyone, I'm using moodle 3.4, I want to hide calendar in the menu but I cannnot find a way to do that, and I tried to add script in custom css in Theme Setting but it doesn't work (The script work fine in inspector), any suggestion? thanks!!!

Script I used:

/*wanna hide calendar in menu*/

a[data-key='calendar']{
display:none !important;
}

/*wanna hide new event button*/

button[data-action='new-event-button']{
display:none !important;
}

 
Average of ratings: -
Picture of A. Obeid
Re: Hide Calendar in menu
 
Average of ratings: -
Picture of Isaac Wong
Re: Hide Calendar in menu
 

Thanks a lot!!!

btw what can I do if I only want to hide/disable the "new event" button form the Calendar. Thanks.

 
Average of ratings: -
Picture of A. Obeid
Re: Hide Calendar in menu
Particularly helpful Moodlers

To Hide the "new event" button you can change the role permissions and prevent capability to manage/add calendar entries.

 
Average of ratings: -