7d2a0492 |
1 | <?php |
2 | // This file is part of Moodle - http://moodle.org/ |
3 | // |
4 | // Moodle is free software: you can redistribute it and/or modify |
5 | // it under the terms of the GNU General Public License as published by |
6 | // the Free Software Foundation, either version 3 of the License, or |
7 | // (at your option) any later version. |
8 | // |
9 | // Moodle is distributed in the hope that it will be useful, |
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | // GNU General Public License for more details. |
13 | // |
14 | // You should have received a copy of the GNU General Public License |
15 | // along with Moodle. If not, see <http://www.gnu.org/licenses/>. |
16 | |
17 | /** |
18 | * This file contains general functions for the course format Week |
19 | * |
20 | * @since 2.0 |
21 | * @package moodlecore |
22 | * @copyright 2009 Sam Hemelryk |
23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
24 | */ |
25 | |
26 | /** |
27 | * Used to display the course structure for a course where format=weeks |
28 | * |
29 | * This is called automatically by {@link load_course()} if the current course |
30 | * format = weeks. |
31 | * |
47c96a77 |
32 | * @param navigation_node $navigation The course node |
33 | * @param array $path An array of keys to the course node |
34 | * @param stdClass $course The course we are loading the section for |
7d2a0492 |
35 | */ |
3406acde |
36 | function callback_weeks_load_content(&$navigation, $course, $coursenode) { |
dc076831 |
37 | return $navigation->load_generic_course_sections($course, $coursenode, get_string('week'), 'week', get_string('section0name', 'format_weeks')); |
7d2a0492 |
38 | } |
39 | |
40 | /** |
41 | * The string that is used to describe a section of the course |
42 | * e.g. Topic, Week... |
43 | * |
44 | * @return string |
45 | */ |
46 | function callback_weeks_definition() { |
47 | return get_string('week'); |
48 | } |
49 | |
50 | /** |
51 | * The GET argument variable that is used to identify the section being |
52 | * viewed by the user (if there is one) |
53 | * |
54 | * @return string |
55 | */ |
56 | function callback_weeks_request_key() { |
57 | return 'week'; |
58 | } |
aa6c1ced |
59 | |