From 16138f1abd6de8d14f326cf805a311d5712f785f Mon Sep 17 00:00:00 2001 From: Gareth Barnard <1058419+gjb2048@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:30:13 +0100 Subject: [PATCH] Adjustment - #215. --- classes/output/courseformat/content.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/classes/output/courseformat/content.php b/classes/output/courseformat/content.php index ddc55ba1..37e5d770 100644 --- a/classes/output/courseformat/content.php +++ b/classes/output/courseformat/content.php @@ -189,7 +189,8 @@ public function export_for_template(\renderer_base $output) { foreach ($sections as $section) { $sectionvisiblity[$section->id] = new stdClass; $sectionvisiblity[$section->id]->ishidden = (!empty($section->ishidden)); - $sectionvisiblity[$section->id]->visibility = $section->visibility; + $sectionvisiblity[$section->id]->hiddenfromstudents = (!empty($section->hiddenfromstudents)); + $sectionvisiblity[$section->id]->notavailable = (!empty($section->notavailable)); } } foreach ($sectionsforgrid as $section) { @@ -246,7 +247,8 @@ public function export_for_template(\renderer_base $output) { // Visibility information. $sectionimages[$section->id]->ishidden = $sectionvisiblity[$section->id]->ishidden; if ($sectionimages[$section->id]->ishidden) { - $sectionimages[$section->id]->visibility = $sectionvisiblity[$section->id]->visibility; + $sectionimages[$section->id]->hiddenfromstudents = $sectionvisiblity[$section->id]->hiddenfromstudents; + $sectionimages[$section->id]->notavailable = $sectionvisiblity[$section->id]->notavailable; $sectionimages[$section->id]->hasbadge = true; }