Hello,
we plan a relaunch of our Moodle with the latest version.
I wrote a small plugin to extend the navigation (I want to hide the menu item "My courses", the hook "local_<pluginname>_extend_navigation(global_navigation $navigation)" gets called.
This is a snippet from my plugin:
if ($item = $navigation->find("mycourses", global_navigation::TYPE_ROOTNODE)) {
$item->remove();
}
I tried different versions, also with $item->showinflatnavigation = false. But I don't get it right. The "My courses" menu item still appears. In our older Moodle System (3.5) this was the way it worked.
Were there any changes in Moodle 4? For any help I would be very grateful!
Thanks a lot!