Hiding Custom menus based on a user profile field

Hiding Custom menus based on a user profile field

by Hemamalini K R -
Number of replies: 3

Hi,

Installed moodle 2.9.2 version.

Have created custom Menus and it is working fine.

Would like to know how to have different custom menus shown to different categories of users.

We have divided Users under different Categories (For eg : HR, Finance,.......) . When a User creates an account would select the category applicable to him. Category is a custom profile field.

Based on the Category of users, different courses would get exposed to them. A User under the category HR should have HR Courses getting shown and those under Finance Category should be able to see Finance Courses.

Is there a way to restrict or hide menus based on User profile field.

Appreciate your help. Thanks in advance.






Average of ratings: -
In reply to Hemamalini K R

Re: Hiding Custom menus based on a user profile field

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Yes there is but it would entail quite a good bit of coding.

The Morecandy theme uses two types of menus, one is written into the theme and the other is the normal Moodle menu.

So the trick or tricky bit in this case would be for you to copy the parts that add this menu to each of your course themes.

I can seperate these different elements for you if you are prepared give it a go?

Cheers

Mary

In reply to Hemamalini K R

Re: Hiding Custom menus based on a user profile field

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Just rereading your question.

The method of working with my suggestion is by creating course themes, each with its own set of menu items.

Also as normal any course your users are enrolled in would be listed in the user dashboard in Moodle / my page.

Hope this helps?

Mary

In reply to Mary Evans

Re: Hiding Custom menus based on a user profile field

by Hemamalini K R -

Thanks Mary for your prompt reply. Let me try with course themes and get back to you in case of help.