Proyectos de Subversion Moodle

Rev

Rev 1419 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1419 Rev 1420
Línea 1... Línea 1...
1
<?php
1
<?php
2
defined('MOODLE_INTERNAL') || die();
2
defined('MOODLE_INTERNAL') || die();
Línea 3... Línea 3...
3
 
3
 
-
 
4
require_once($CFG->dirroot . '/course/format/lib.php');
4
require_once($CFG->dirroot . '/course/format/lib.php');
5
 
5
require_once($CFG->libdir . '/accesslib.php');
6
use core_courseformat\base as course_format;
Línea 6... Línea 7...
6
require_once($CFG->dirroot . '/lib/classes/context/course.php');
7
use context_course;
7
 
8
 
8
/**
9
/**
9
 * Main class for the Remui format.
10
 * Main class for the Remui format.
10
 *
11
 *
11
 * @package    format_remuiformat
12
 * @package    format_remuiformat
12
 * @copyright  2024
13
 * @copyright  2024
13
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
14
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
14
 */
15
 */
Línea 15... Línea 16...
15
class format_remuiformat extends format_base
16
class format_remuiformat extends course_format
16
{
17
{
17
 
18
 
Línea 50... Línea 51...
50
        $section = $this->get_section($section);
51
        $section = $this->get_section($section);
51
        if ((string)$section->name !== '') {
52
        if ((string)$section->name !== '') {
52
            return format_string(
53
            return format_string(
53
                $section->name,
54
                $section->name,
54
                true,
55
                true,
55
                array('context' => context_course::instance($this->courseid))
56
                array('context' => \context_course::instance($this->courseid))
56
            );
57
            );
57
        } else {
58
        } else {
58
            return $this->get_default_section_name($section);
59
            return $this->get_default_section_name($section);
59
        }
60
        }
60
    }
61
    }