Removing some menu items

Removing some menu items

by James Brown -
Number of replies: 12
Hi, I am using Moodle Ver 3.2 with the Boost theme installed. So far everything is going well but I find some items in the top left drop down menu irrelevant and want to take them away. As the site users are young kids, we adopt the minimalist design principle,  the less unnecessary items on the screen, the better the learning experience to our students. 


For privacy reasons, the enrolled students do not need to know who are other students so want to take away the 'Participants'.

The folder icons are more or less  useless as they just take you to the different sections so want to take them away too. 

Storing private files on the site is prohibited so want to get rid of 'Private files' as well. 


Looking forward to hear your feedback, thanks.

James


Attachment Picture1.png
Average of ratings: -
In reply to James Brown

Re: Removing some menu items

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Moving to Themes forum....

Oddly enough though, https://moodle.org/mod/forum/discuss.php?d=344068

I'm thinking maybe filing a tracker report to request a theme setting to suppress certain items in that menu. I know what you mean - I have sites where things like Private files and the Calendar are not used. 

However, how did you disable Private files on your site? I removed the capability 'moodle/user:manageownfiles' from the 'authenticated user' role and the link vanished. What I would expect (although possibly not very obvious). Similarly, removing the capability 'moodle/course:viewparticipants' in the student role should kill the Participants link in courses (I didn't try it). 

The menu seems to work fine as long as you actually disable the thing you don't want. Just removing the menu item isn't really the answer.

Average of ratings:Useful (1)
In reply to Howard Miller

Re: Removing some menu items

by Randy Thornton -


Howard,

I checked and If you disable the Private Files repository completely, it still shows up in the menu in Boost. It should check at least to see if something is enabled or visible in the site. Checking permissions is not sufficient.

I think that's a bug, even apart from the inability to manage the menu. If you can confirm, I think it is a tracker.


The course menu is a bit better: if you disable Competencies or Course level badges, then the menu checks and hides those. as it should in any theme.

However, the course menu still shows the Shortname of the course at the top, right above Participants, even when you have set it to use the Full name in Appearance > Navigation. I would call that a bug too, though it may have been by design sad


Randy






Attachment screenshot_1863.jpg
In reply to Randy Thornton

Re: Removing some menu items

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You didn't read what I said wink   Disabling the repository is only half of it. That doesn't stop users saving private files just reading them. You need to remove the capability as well

In reply to Howard Miller

Re: Removing some menu items

by Randy Thornton -

Quite right, Howard. I understand how it works, which is bizarrely.

But the code should check both - especially if you are going to *force* the menu item to be present for all users with no tool to manage the menu. If the repository is disabled, it should not be on the menu. That's the standard behavior consistent with disabling any sort of plugins, reps, mods, blocks, etc.

The Clean theme in 3.2 does not show a Private files link at all in the standard Navigation block, even when the repository is enabled. So this menu item is specifically added to Boost.


A related issue from the OP is the calendar menu item. The permissions workaround does not seem to work for Calendar.

If I set  moodle/calendar:manageownentries to Prohibit for Authenticated user, I still have the Calendar menu item and can still reach it.

This is also true in Clean, too, from the Navigation block > Site pages. So I suspect that it doesn't check at all, and maybe never did.


In reply to Randy Thornton

Re: Removing some menu items

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Well, I didn't try it exhaustively and I did exactly what you did the first time I tried to disable the Private files link. 

I suspect there's going to be a steady drip of moans about this menu because it just won't suit everybody... or even anybody wink

In reply to Howard Miller

Re: Removing some menu items

by Randy Thornton -

Unfortunately, the code for the Calendar link (/course/lib.php, line 3741) only checks if a user is logged in, but nothing else.

So, since there's no way to hide this in the css for lack of an id or class selector (I tried that), I think we are stuck with it for now (without changing code, that is).


Hah - I suspect you are quite right about complaints about not being able to manage the menu!

In a way, it is a compliment:  I think the Nav Drawer has nicely solved the style and ease of use issues with the Navigation block and docking. It's a real improvement. But underneath it is the old code. Hopefully the popularity of the Nav Drawer will lead to getting that code customisable and some sort of control interface for admins and teachers.


Average of ratings:Useful (2)
In reply to Howard Miller

Re: Removing some menu items

by Randy Thornton -

FYI,

changing that code in course/lib.php from

$options->calendar = $isloggedin;

to

 $options->calendar = $isloggedin && has_capability('moodle/calendar:manageownentries', $sitecontext);

hides the link if you take away the capability. While

$options->calendar = false;

will just hide it in the menu (both Boost and Clean using the Nav block) but the calendar is otherwise usable.



Average of ratings:Useful (1)
In reply to Randy Thornton

Re: Removing some menu items

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I think "navigation menu doesn't check the calendar capability" is in the realms of a bug report. I'll leave that to you wink

In reply to Howard Miller

Removing some menu items

by James Brown -

Thanks Howard for your suggestions, they work smile

While the 'Participants' and 'Private files' item were removed from the menu, there is still an 'Online Users' block on the right when users click Dashboard sad Thankfully, I managed to take similar steps to render the block to display a number only, not a list of people.

Cheers
James 

In reply to James Brown

Re: Removing some menu items

by Mary Evans -

Hi,

With respect to the default Dashboard that all users see, the site Administrator has total control oF it. You just need to make sure which blocks you want your users to see. 

Read Moodle Docs for Adminiistrators for more info.

Hope this helps?

Mary

In reply to Howard Miller

Re: Removing some menu items

by Derek Chirnside -

Howard, I am not sure this is (just) a themes issue.  This is a UI question, and is not as far as I know fixable at the theme level.

Anyone: now we have got 3.2.1 out of the way and launched, MoodleHQ hopefully has had a day off for a nice cold relaxing beer or a hot toddy depending on their timezone.

I'm interested in the question of WHAT is IN THE drawer - and what is configurable

  • Are there any tracker requests on this issue?
  • Do we have any consensus on what may be a good way ahead with drawer to offer a little customising to the theme designer or end user as to what is in the drawer?  It should not be complex.  I know something should be done.
  • Is there anyone out there who has been using this with students and staff and can get a good feel on things?
  • Is it worth a summary thread somewhere to get a better feel for things, or set up a general tracker item and see what discussion emerges.

-Derek