A client of mine asked if they could turn OFF the "my home" button, and the "site pages" button. I wasn't able to see a setting for it (e.g. not documented at http://docs.moodle.org/22/en/Navigation that it is possible) so I looked into the code.
I had to modify the /moodle/blocks/navigation/ block. This is of course not ideal, and was wondering what the correct way to perform this would be instead?
E.g to add the option to the settings form I had to modify the specific_definition inside block_navigation_edit_form class to modify
$mods = array('enabledock'=>'yes', 'linkcategories'=>'no', 'showmyhome'=>'yes');
then within the rendere:
} else if ($item->action instanceof moodle_url) {
if ($item->action == new moodle_url('/my/') && $options['showmyhome']=='no') {
continue;
} else {
$content = html_writer::link($item->action, $content, $attributes);
}
I basically want to have a plugin (say, in /local/) that can just modify the global $navigation for the rootnodes ['site'] & ['home'] but I can't figure out how to do that.