In Moodle 2.2, I'm trying to get my custom menus to dynamically organize itself by categories. For example:
Home Cat1 Cat2 | | | -Bizz -Course1 -Course3 | | | -Bam -Course2 -Course4
I have already successfully overriden the core_renderer class, and have all the user's enrolled courses listed as a "flat" tree. I see from…
http://phpdocs.moodle.org/HEAD/moodlecore/navigation/navigation_node.html
…that navigation_node doesn't seem to have a way to access a course's categories.
How do I:
* Loop through categories, finding the courses that way, in the theme's core_renderer context
-or-
* Loop through courses, getting their category name along the way, in the theme's core_renderer context
Since this code will be executed with every page refresh, speed is parmount. Thanks for any help or advice.