X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=blobdiff_plain;f=course%2Fformat%2Fweeks%2Flib.php;h=4d541728ffd39d985ad973cec2607c0f51206a00;hp=ebad925bbb457c461121741796b129552074ca50;hb=dc0768310870423c69c0bd2e8271423b8e873f3e;hpb=aa6c1ced0a9669115f6d7e97f22e9556b61ca81a diff --git a/course/format/weeks/lib.php b/course/format/weeks/lib.php index ebad925bbb4..4d541728ffd 100644 --- a/course/format/weeks/lib.php +++ b/course/format/weeks/lib.php @@ -33,23 +33,8 @@ * @param array $path An array of keys to the course node * @param stdClass $course The course we are loading the section for */ -function callback_weeks_load_content(&$navigation, $keys, $course) { - $navigation->add_course_section_generic($keys, $course, get_string('week'), 'week'); -} - -/** - * Used to display the course structure for a course where format=weeks - * - * This is called automatically by {@link load_course()} if the current course - * format = weeks and the navigation was requested via AJAX - * - * @param navigation_node $navigation The course node - * @param array $path An array of keys to the course node - * @param stdClass $course The course we are loading the section for - * @param stdClass $section The section to load - */ -function callback_weeks_load_limited_section(&$navigation, $keys, $course, $section) { - $navigation->limited_load_section_generic($keys, $course, $section, get_string('week'), 'week'); +function callback_weeks_load_content(&$navigation, $course, $coursenode) { + return $navigation->load_generic_course_sections($course, $coursenode, get_string('week'), 'week', get_string('section0name', 'format_weeks')); } /**