Skip to content

Commit

Permalink
Adjustment - #215.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Aug 20, 2024
1 parent 951edb9 commit 01c6e8f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions classes/output/courseformat/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 01c6e8f

Please sign in to comment.