From 657f06cf54a364a2c63abbd3bfd827254a1f90bd Mon Sep 17 00:00:00 2001 From: James C <5689414+james-cnz@users.noreply.github.com> Date: Tue, 30 Jul 2024 14:46:03 +1200 Subject: [PATCH] Moodle 4.5 subsections WIP 3 --- classes/output/courseformat/content.php | 3 ++- templates/courseformat/content.mustache | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/classes/output/courseformat/content.php b/classes/output/courseformat/content.php index d580678..24205db 100644 --- a/classes/output/courseformat/content.php +++ b/classes/output/courseformat/content.php @@ -353,7 +353,8 @@ private function get_sections_to_display(\course_modinfo $modinfo): array { $pageid = ($thissectionextra->levelsan != FORMAT_MULTITOPIC_SECTION_LEVEL_TOPIC) ? $thissectionextra->id : $thissectionextra->parentid; $onpage = ($pageid == $format->get_sectionid()); - if ($onpage || $format->show_editor() && empty($displaysectionextra->sectionbase->component) && empty($thissectionextra->sectionbase->component)) { + if ($onpage || $format->show_editor() && empty($displaysectionextra->sectionbase->component) + && empty($thissectionextra->sectionbase->component)) { $sectionstodisplay[] = $thissectionextra->sectionbase; } } diff --git a/templates/courseformat/content.mustache b/templates/courseformat/content.mustache index adb7a5c..f9ee487 100644 --- a/templates/courseformat/content.mustache +++ b/templates/courseformat/content.mustache @@ -138,8 +138,8 @@ "selector": "" }, "singlesection": { - "num": 1, - "id": 35, + "num": 5, + "id": 37, "header": { "name": "Single Section Example", "url": "#" @@ -152,9 +152,9 @@ "cmname": "Assign example", "hasname": "true" }, - "id": 4, - "cmid": 4, - "anchor": "module-4", + "id": 6, + "cmid": 6, + "anchor": "module-6", "module": "assign", "extraclasses": "" }