Skip to content

Commit

Permalink
Moodle 4.5 subsections WIP 16
Browse files Browse the repository at this point in the history
  • Loading branch information
james-cnz committed Oct 15, 2024
1 parent af0877e commit 63ea448
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions classes/output/courseformat/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,11 @@ public function export_for_template(\renderer_base $output) {
* @return array data context for a mustache template
*/
protected function export_sections(\renderer_base $output): array {

$format = $this->format;
$course = $format->get_course();
$modinfo = $this->format->get_modinfo();

// Generate section list.
$sectionseft = [];
// REMOVED stealthsections and numsections.
Expand All @@ -322,11 +324,15 @@ protected function export_sections(\renderer_base $output): array {
throw new \moodle_exception('unknowncoursesection', 'error', course_get_url($course),
format_string($course->fullname));
}

$section = new $this->sectionclass($format, $thissection);

// REMOVED: numsections.

if (!$format->is_section_visible($thissection)) {
continue;
}

$sectionseft[] = $section->export_for_template($output);
}
// REMOVED stealthsections.
Expand Down

0 comments on commit 63ea448

Please sign in to comment.