| Línea 81... |
Línea 81... |
| 81 |
'title' => $format->get_section_name($section),
|
81 |
'title' => $format->get_section_name($section),
|
| 82 |
'hassummary' => !empty($section->summary),
|
82 |
'hassummary' => !empty($section->summary),
|
| 83 |
'rawtitle' => $section->name,
|
83 |
'rawtitle' => $section->name,
|
| 84 |
'cmlist' => [],
|
84 |
'cmlist' => [],
|
| 85 |
'visible' => !empty($section->visible),
|
85 |
'visible' => !empty($section->visible),
|
| 86 |
'sectionurl' => course_get_url($course, $section->section, ['navigation' => true])->out(),
|
86 |
'sectionurl' => course_get_url($course, $section->section, ['navigation' => true])->out(false),
|
| 87 |
'current' => $format->is_section_current($section),
|
87 |
'current' => $format->is_section_current($section),
|
| 88 |
'indexcollapsed' => $indexcollapsed,
|
88 |
'indexcollapsed' => $indexcollapsed,
|
| 89 |
'contentcollapsed' => $contentcollapsed,
|
89 |
'contentcollapsed' => $contentcollapsed,
|
| 90 |
'hasrestrictions' => $this->get_has_restrictions(),
|
90 |
'hasrestrictions' => $this->get_has_restrictions(),
|
| 91 |
'bulkeditable' => $this->is_bulk_editable(),
|
91 |
'bulkeditable' => $this->is_bulk_editable(),
|
| 92 |
'component' => $section->component,
|
92 |
'component' => $section->component,
|
| 93 |
'itemid' => $section->itemid,
|
93 |
'itemid' => $section->itemid,
|
| - |
|
94 |
'parentsectionid' => $section->get_component_instance()?->get_parent_section()?->id,
|
| 94 |
];
|
95 |
];
|
| Línea 95... |
Línea 96... |
| 95 |
|
96 |
|
| 96 |
if (empty($modinfo->sections[$section->section])) {
|
97 |
if (empty($modinfo->sections[$section->section])) {
|
| 97 |
return $data;
|
98 |
return $data;
|
| Línea 98... |
Línea 99... |
| 98 |
}
|
99 |
}
|
| 99 |
|
100 |
|
| 100 |
foreach ($modinfo->sections[$section->section] as $modnumber) {
|
101 |
foreach ($modinfo->sections[$section->section] as $modnumber) {
|
| 101 |
$mod = $modinfo->cms[$modnumber];
|
102 |
$mod = $modinfo->cms[$modnumber];
|
| 102 |
if ($section->uservisible && $mod->is_visible_on_course_page()) {
|
103 |
if ($section->uservisible && $mod->is_visible_on_course_page() && $mod->is_of_type_that_can_display()) {
|
| 103 |
$data->cmlist[] = $mod->id;
|
104 |
$data->cmlist[] = $mod->id;
|
| Línea 104... |
Línea 105... |
| 104 |
}
|
105 |
}
|