Injecting course navigation nodes via local_[pluginname]_extend_navigation()

Injecting course navigation nodes via local_[pluginname]_extend_navigation()

by Philipp Hager -
Number of replies: 0
Picture of Core developers

Hello guys,


I'm currently working on updating (or preparing to update) a local plugin for Moodle 3.2 and have seen, that the 'Grades' menu item in the course administration moved to 'My courses' => Coursename => 'Grades'. If I try to inject the node leading to my local plugin right under it, I have no problems in the current course, but how do I inject the node into the menu structure acquired via AJAX call, when I try to expand another course?

I hope somebody can help me out. I tried to inject the nodes for all courses in my local_[pluginname]_extend_navigation() function but that just leaves the other courses with the local plugin node as the only one, due to all others just being loaded via AJAX.

Is there any other callback I missed?


So tldr: I wanna just have a link to my local plugin's view.php?id=COURSEID after each 'Grades' node of the course (if the course contains instances of a certain activity module - but that's the easy part).

Average of ratings: -