2 // This file is part of Moodle - http://moodle.org/
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.
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.
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/>.
18 * This file contains general functions for the course format Social
22 * @copyright 2009 Sam Hemelryk
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
27 * Used to display the course structure for a course where format=social
29 * This is called automatically by {@link load_course()} if the current course
32 * @param array $path An array of keys to the course node in the navigation
33 * @param stdClass $modinfo The mod info object for the current course
34 * @return bool Returns true
36 function callback_social_load_content(&$navigation, $course, $coursenode) {
37 return $navigation->load_generic_course_sections($course, $coursenode, 'social');
41 * Used to display the course structure for a course where format=social
43 * This is called automatically by {@link load_course()} if the current course
44 * format = weeks and the navigation was requested via AJAX
46 * @param array $path An array of keys to the course node in the navigation
47 * @param stdClass $modinfo The mod info object for the current course
48 * @return bool Returns true
50 function limited_load_section_social(&$navigation, $keys, $course, $section) {
51 $navigation->limited_load_section_generic($keys, $course, $section, get_string('social'), 'social');
55 * Indicates this format uses sections.
57 * @return bool Returns true
59 function callback_social_uses_sections() {
64 * The string that is used to describe a section of the course
69 function callback_social_definition() {
70 return get_string('topic');
74 * Toogle display of course contents (sections, activities)
78 function callback_social_display_content() {