Skip to content

Commit

Permalink
Another fix for #215.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Sep 3, 2024
1 parent 9b12eaf commit 132d03d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions classes/output/courseformat/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ public function export_for_template(\renderer_base $output) {
$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 = (!empty($sectionimages[$section->id]->visibility->hiddenfromstudents));
$sectionimages[$section->id]->notavailable = (!empty($sectionimages[$section->id]->visibility->notavailable));
$sectionimages[$section->id]->hasbadge = true;
}

Expand Down
10 changes: 5 additions & 5 deletions templates/grid.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@
{{/sectionbreak}}
<div id="section-{{number}}" class="grid-section card{{#iscurrent}} currentgridsection{{/iscurrent}}" title="{{sectionname}}">
{{^popup}}
{{#hasbadge}}<div class="grid-section-inner">{{/hasbadge}}
{{^hasbadge}}<a class="grid-section-inner" href="{{sectionurl}}">{{/hasbadge}}
{{#notavailable}}<div class="grid-section-inner d-flex p-0 flex-column h-100 justify-content-between">{{/notavailable}}
{{^notavailable}}<a class="grid-section-inner d-flex p-0 flex-column h-100 justify-content-between" href="{{sectionurl}}">{{/notavailable}}
{{/popup}}
{{#popup}}
<div class="grid-modal grid-section-inner d-flex flex-column h-100 justify-content-between" data-toggle="modal" data-target="#gridPopup" data-section="{{number}}" tabindex="0">
<div class="grid-modal grid-section-inner card-body p-0 d-flex flex-column h-100 justify-content-between" data-toggle="modal" data-target="#gridPopup" data-section="{{number}}" tabindex="0">
{{/popup}}
<div class="card-header text-truncate h-100">
<h3 class="h4">{{{sectionname}}}</h3>
Expand Down Expand Up @@ -109,8 +109,8 @@
</div>
{{/imageerror}}
{{^popup}}
{{#hasbadge}}</div>{{/hasbadge}}
{{^hasbadge}}</a>{{/hasbadge}}
{{#notavailable}}</div>{{/notavailable}}
{{^notavailable}}</a>{{/notavailable}}
{{/popup}}
{{#popup}}
</div>
Expand Down

0 comments on commit 132d03d

Please sign in to comment.