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 * Renderer for outputting the weeks course format. 19 * 20 * @package format_weeks 21 * @copyright 2012 Dan Poltawski 22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 * @since Moodle 2.3 24 */ 25 26 namespace format_weeks\output; 27 28 use core_courseformat\output\section_renderer; 29 30 /** 31 * Basic renderer for weeks format. 32 * 33 * @copyright 2012 Dan Poltawski 34 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 35 */ 36 class renderer extends section_renderer { 37 38 /** 39 * Generate the section title, wraps it in a link to the section page if page is to be displayed on a separate page 40 * 41 * @param stdClass $section The course_section entry from DB 42 * @param stdClass $course The course entry from DB 43 * @return string HTML to output. 44 */ 45 public function section_title($section, $course) { 46 return $this->render(course_get_format($course)->inplace_editable_render_section_name($section)); 47 } 48 49 /** 50 * Generate the section title to be displayed on the section page, without a link 51 * 52 * @param stdClass $section The course_section entry from DB 53 * @param stdClass $course The course entry from DB 54 * @return string HTML to output. 55 */ 56 public function section_title_without_link($section, $course) { 57 return $this->render(course_get_format($course)->inplace_editable_render_section_name($section, false)); 58 } 59 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body