Hello Moodlers
I am trying to extend the Moodle user menu to add a link (where the red arrow is) using a local plugin.
I have the following code
function local_myplugin_extend_navigation_user($parentnode, $user, $context, $course, $coursecontext) {
$url = new moodle_url('/local/myplugin/preferences.php');
$subsnode = navigation_node::create(get_string('preferenceslink', 'local_myplugin'), $url,
navigation_node::TYPE_SYSTEM, null, 'test', new pix_icon('i/settings', ''));
$parentnode->add_node($subsnode);
}
For some reason this does not do the trick. I even tried to var_dump($parentnote)
I see that my custom link appears there but it does not show on the menu when I open the actual page.
I read the Moodle docs but I can't figure out whats going on.
Anyone managed to do this?