From f4100be23cb4872c56d790734a738e9a987c0f23 Mon Sep 17 00:00:00 2001 From: Gareth Barnard <1058419+gjb2048@users.noreply.github.com> Date: Mon, 19 Aug 2024 12:29:46 +0100 Subject: [PATCH] ishidden may not exist in the stdClass - #215. --- classes/output/courseformat/content.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/output/courseformat/content.php b/classes/output/courseformat/content.php index 9c7ce269..ddc55ba1 100644 --- a/classes/output/courseformat/content.php +++ b/classes/output/courseformat/content.php @@ -188,7 +188,7 @@ public function export_for_template(\renderer_base $output) { $sectionvisiblity = []; foreach ($sections as $section) { $sectionvisiblity[$section->id] = new stdClass; - $sectionvisiblity[$section->id]->ishidden = $section->ishidden; + $sectionvisiblity[$section->id]->ishidden = (!empty($section->ishidden)); $sectionvisiblity[$section->id]->visibility = $section->visibility; } }