Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 65... Línea 65...
65
    protected $controlclass;
65
    protected $controlclass;
Línea 66... Línea 66...
66
 
66
 
67
    /** @var section availability output class */
67
    /** @var section availability output class */
Línea 68... Línea -...
68
    protected $availabilityclass;
-
 
69
 
-
 
70
    /** @var optional move here output class */
-
 
71
    protected $movehereclass;
68
    protected $availabilityclass;
72
 
69
 
Línea 73... Línea 70...
73
    /** @var optional visibility output class */
70
    /** @var optional visibility output class */
74
    protected $visibilityclass;
71
    protected $visibilityclass;
Línea 93... Línea 90...
93
     */
90
     */
94
    public function __construct(course_format $format, section_info $section) {
91
    public function __construct(course_format $format, section_info $section) {
95
        $this->format = $format;
92
        $this->format = $format;
96
        $this->section = $section;
93
        $this->section = $section;
Línea 97... Línea -...
97
 
-
 
98
        if ($section->section > $format->get_last_section_number()) {
94
 
99
            $this->isstealth = true;
-
 
Línea 100... Línea 95...
100
        }
95
        $this->isstealth = $section->is_orphan();
101
 
96
 
102
        // Load output classes names from format.
97
        // Load output classes names from format.
103
        $this->headerclass = $format->get_output_classname('content\\section\\header');
98
        $this->headerclass = $format->get_output_classname('content\\section\\header');
104
        $this->cmlistclass = $format->get_output_classname('content\\section\\cmlist');
99
        $this->cmlistclass = $format->get_output_classname('content\\section\\cmlist');
105
        $this->summaryclass = $format->get_output_classname('content\\section\\summary');
100
        $this->summaryclass = $format->get_output_classname('content\\section\\summary');
106
        $this->cmsummaryclass = $format->get_output_classname('content\\section\\cmsummary');
101
        $this->cmsummaryclass = $format->get_output_classname('content\\section\\cmsummary');
107
        $this->controlmenuclass = $format->get_output_classname('content\\section\\controlmenu');
-
 
108
        $this->availabilityclass = $format->get_output_classname('content\\section\\availability');
102
        $this->controlmenuclass = $format->get_output_classname('content\\section\\controlmenu');
109
        $this->movehereclass = $format->get_output_classname('content\\section\\movehere');
103
        $this->availabilityclass = $format->get_output_classname('content\\section\\availability');
Línea 110... Línea 104...
110
        $this->visibilityclass = $format->get_output_classname('content\\section\\visibility');
104
        $this->visibilityclass = $format->get_output_classname('content\\section\\visibility');
-
 
105
    }
-
 
106
 
-
 
107
    /**
-
 
108
     * Check if the section is considered stealth.
-
 
109
     *
-
 
110
     * @return bool
-
 
111
     */
-
 
112
    public function is_stealth(): bool {
-
 
113
        return $this->isstealth;
111
    }
114
    }
112
 
115
 
113
    /**
116
    /**
114
     * Hide the section title.
117
     * Hide the section title.
115
     *
118
     *
Línea 144... Línea 147...
144
        $summary = new $this->summaryclass($format, $section);
147
        $summary = new $this->summaryclass($format, $section);
Línea 145... Línea 148...
145
 
148
 
146
        $data = (object)[
149
        $data = (object)[
147
            'num' => $section->section ?? '0',
150
            'num' => $section->section ?? '0',
148
            'id' => $section->id,
151
            'id' => $section->id,
149
            'sectionreturnid' => $format->get_sectionnum(),
152
            'sectionreturnnum' => $format->get_sectionnum(),
150
            'insertafter' => false,
153
            'insertafter' => false,
151
            'summary' => $summary->export_for_template($output),
154
            'summary' => $summary->export_for_template($output),
152
            'highlightedlabel' => $format->get_section_highlighted_name(),
155
            'highlightedlabel' => $format->get_section_highlighted_name(),
153
            'sitehome' => $course->id == SITEID,
156
            'sitehome' => $course->id == SITEID,
154
            'editing' => $PAGE->user_is_editing(),
157
            'editing' => $PAGE->user_is_editing(),
-
 
158
            'displayonesection' => ($course->id != SITEID && $format->get_sectionid() == $section->id),
-
 
159
            // Section name is used as data attribute is to facilitate behat locators.
155
            'displayonesection' => ($course->id != SITEID && !is_null($format->get_sectionid())),
160
            'sectionname' => $format->get_section_name($section),
Línea 156... Línea 161...
156
        ];
161
        ];
157
 
162
 
158
        $haspartials = [];
163
        $haspartials = [];