gjb2048/moodle-format_topcoll — pull request #9 by mhughes2k (2013-06-07 13:05:10+00:00)
Title: CONTRIB_4403 for Moodle_25 branch

This should do the navigation items.

I'm hoping that it works fine.

The main changes are:
* changed ``get_section_name()``` function to call get_proper_section_name()
* added ```get_proper_section_name($section, $fornavigation)``` - this was to simply re-use most of the existing code but not break the required interface
* added ```extend_course_navigation()``` function which generates the nav items. This is mostly duplicated code from the navigation API but there are issues around the functions being protected that means you can't just use the Navigation API calls :-(
* added ```generate_sections_and_activities($navigation, stdClass $course)``` again for the same reason that we want the same behaviour but the protected keyword means we can't access the function

Should be fairly self explanatory