Skip to content

Commit

Permalink
Moodle 4.5 subsections WIP 3
Browse files Browse the repository at this point in the history
  • Loading branch information
james-cnz committed Jul 30, 2024
1 parent 44b87b5 commit 657f06c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion classes/output/courseformat/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
10 changes: 5 additions & 5 deletions templates/courseformat/content.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@
"selector": "<select><option>Section 4</option></select>"
},
"singlesection": {
"num": 1,
"id": 35,
"num": 5,
"id": 37,
"header": {
"name": "Single Section Example",
"url": "#"
Expand All @@ -152,9 +152,9 @@
"cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Assign example</span></a>",
"hasname": "true"
},
"id": 4,
"cmid": 4,
"anchor": "module-4",
"id": 6,
"cmid": 6,
"anchor": "module-6",
"module": "assign",
"extraclasses": ""
}
Expand Down

0 comments on commit 657f06c

Please sign in to comment.