Remove or disable "Preferred language", "Forum preferences", "Editor preferences" and "Course preferences" and calendar preferences from Preferences menu page and in user profile section Miscellaneous menu

Remove or disable "Preferred language", "Forum preferences", "Editor preferences" and "Course preferences" and calendar preferences from Preferences menu page and in user profile section Miscellaneous menu

by Ismath Khan -
Number of replies: 9

Hi,

I am using Moodle 3.9

I wish to remove "Preferred language", "Forum preferences", "Editor preferences" and "Course preferences" from Preference menu page and miscellaneous and some menu need to remove or disable in user profile page.

Please help me in doing this.

 

Thanks in advance.


Average of ratings: -
In reply to Ismath Khan

Re: Remove or disable "Preferred language", "Forum preferences", "Editor preferences" and "Course preferences" and calendar preferences from Preferences menu page and in user profile section Miscellaneous menu

by Ismath Khan -
ken please kindly help thank you
In reply to Ismath Khan

Re: Remove or disable "Preferred language", "Forum preferences", "Editor preferences" and "Course preferences" and calendar preferences from Preferences menu page and in user profile section Miscellaneous menu

by Ken Task -
Picture of Particularly helpful Moodlers

After many PM's ... and suggestion you post in public forums where there are more eyes on your issue ...

Am not a theme person ... more a minimalist in form ... more into function - told you that in a PM.  

I seldom (if ever) customize language or theme.    Therefore others who are into themes and customization of the interface would be the persons to respond ... not I!

But that's a hint for you to explore ... language customization.

See:

https://docs.moodle.org/310/en/Language_customisation

No more PM's please.

If anyone can help Ismath, please do!

'SoS', Ken


In reply to Ken Task

Re: Remove or disable "Preferred language", "Forum preferences", "Editor preferences" and "Course preferences" and calendar preferences from Preferences menu page and in user profile section Miscellaneous menu

by Ismath Khan -
ok thank you ken
In reply to Ismath Khan

Re: Remove or disable "Preferred language", "Forum preferences", "Editor preferences" and "Course preferences" and calendar preferences from Preferences menu page and in user profile section Miscellaneous menu

by Mark Sharp -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi Ismath,
it's not a straight-forward page to manage because the links are a collection from various sources. Some are fixed; some depend on capabilities; some depend on user content; some depend on plugins (any plugin can add to the preferences page).

In order to manage what's there, you'd need to look at where each individual item is added to the usercurrentsettings navigation element and then figure out how it got there.

The starting point is /user/preferences.php where you'll see the $PAGE->settingsnav->find('usercurrentsettings') function. This will lead you to lib/navigationlib.php which has the function: generate_user_settings().

Some of the settings include a check for: has_capability('moodle/user:editownprofile') - this is a capability that if switched off for the "authenticated user" role will prohibit anyone from editing some of the profile settings.

Other plugins contribute to this list through a function that has "_extend_user_settings" in its name, so search the code for this string.

Hope these are useful pointers. Please bear in mind though, however tempting it is to edit core code, please don't, you'll only make life hard for yourself when it comes to upgrading your site.
In reply to Mark Sharp

Re: Remove or disable "Preferred language", "Forum preferences", "Editor preferences" and "Course preferences" and calendar preferences from Preferences menu page and in user profile section Miscellaneous menu

by Ismath Khan -
hi Mark,

Thank you so much. i will try this . is this can disable through css also in theme/settings page?
In reply to Ismath Khan

Re: Remove or disable "Preferred language", "Forum preferences", "Editor preferences" and "Course preferences" and calendar preferences from Preferences menu page and in user profile section Miscellaneous menu

by John Provasnik -
Picture of Particularly helpful Moodlers Picture of Testers
Hi Ismath,
If you do a search of the forums, a bunch of suggestions come up - I've used these suggestions in the past to create the following css for my own site. I'm sharing the relevant bits in case it's helpful for your situation:

/* Hide Link on User Preferences Page */
#page-user-preferences a[href*='language.php'],
#page-user-preferences a[href*='forum.php'],
#page-user-preferences a[href*='editor.php'],
#page-user-preferences a[href*='course.php'] {
display: none;
}

/* Hide Link on User Preferences Page */
#page-user-profile a[href*='blog/index.php'],
#page-user-profile a[href*='notes/index.php'],
#page-user-profile a[href*='forum/user.php'],
#page-user-profile a[href*='blog/index.php'],
#page-user-profile a[href*='plans.php'] {
display: none;
}
Average of ratings: Useful (4)
In reply to John Provasnik

Re: Remove or disable "Preferred language", "Forum preferences", "Editor preferences" and "Course preferences" and calendar preferences from Preferences menu page and in user profile section Miscellaneous menu

by Cindy Weber -
That was super helpful John! Is there a way to make a newly created category stay expanded? The General category stays expanded without the use of the 'expand all' button.
In reply to Cindy Weber

Re: Remove or disable "Preferred language", "Forum preferences", "Editor preferences" and "Course preferences" and calendar preferences from Preferences menu page and in user profile section Miscellaneous menu

by John Provasnik -
Picture of Particularly helpful Moodlers Picture of Testers
Hi Cindy, that would not be possible through styling. That would require either theme customization or core code customization (and modify core is not recommended)
In reply to John Provasnik

Re: Remove or disable "Preferred language", "Forum preferences", "Editor preferences" and "Course preferences" and calendar preferences from Preferences menu page and in user profile section Miscellaneous menu

by Cindy Weber -
John...I am using the standard Boost theme with 3.11. Are there multiple theme files that need to be changed to make a newly created category stay open permanently withou using 'expand all' or clicking on the category?