|
26 | 26 | * sectionbreak - There is a section break for this section.
|
27 | 27 | * sectionbreakheading - Section break heading.
|
28 | 28 | * number - Section number.
|
29 |
| - * currentsection - Current section? |
| 29 | + * iscurrent - Current section? |
30 | 30 | * sectionurl - Section URL.
|
31 | 31 | * sectionname - Section name.
|
32 | 32 | * imageuri - Image URI.
|
|
52 | 52 | "sectionbreak": true,
|
53 | 53 | "sectionbreakheading": "This is the section heading",
|
54 | 54 | "number": 42,
|
55 |
| - "currentsection": true, |
| 55 | + "iscurrent": true, |
56 | 56 | "sectionurl": "https://mymoodle/course/view.php?id=4§ion=2",
|
57 | 57 | "sectionname": "The second section",
|
58 | 58 | "imageuri": "https://mymoodle/pluginfile.php/358/format_grid/displayedsectionimage/42/1/ducking.jpg.webp",
|
|
73 | 73 | {{/sectionbreakheading}}
|
74 | 74 | <div class="thegrid d-flex flex-wrap grid-justify-{{gridjustification}}">
|
75 | 75 | {{/sectionbreak}}
|
76 |
| - <div id="section-{{number}}" class="grid-section card{{#currentsection}} currentgridsection{{/currentsection}}"> |
| 76 | + <div id="section-{{number}}" class="grid-section card{{#iscurrent}} currentgridsection{{/iscurrent}}"> |
77 | 77 | {{^popup}}
|
78 |
| - {{#notavailable}}<div class="grid-section-inner">{{/notavailable}} |
79 |
| - {{^notavailable}}<a class="grid-section-inner" href="{{sectionurl}}">{{/notavailable}} |
| 78 | + {{#hasbadge}}<div class="grid-section-inner">{{/hasbadge}} |
| 79 | + {{^hasbadge}}<a class="grid-section-inner" href="{{sectionurl}}">{{/hasbadge}} |
80 | 80 | {{/popup}}
|
81 | 81 | {{#popup}}
|
82 |
| - <div class="grid-modal grid-section-inner" data-toggle="modal" data-target="#gridPopup" data-section="{{number}}" tabindex="0"> |
| 82 | + <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"> |
83 | 83 | {{/popup}}
|
84 |
| - <div class="card-header text-truncate" title="{{sectionname}}">{{{sectionname}}}{{#notavailable}} |
| 84 | + <div class="card-header text-truncate h-100" title="{{sectionname}}">{{{sectionname}}}{{#hasbadge}} |
85 | 85 | <div data-region="sectionbadges" class="sectionbadges d-flex">
|
86 | 86 | {{$ core_courseformat/local/content/section/badges }}
|
87 | 87 | {{> core_courseformat/local/content/section/badges }}
|
88 | 88 | {{/ core_courseformat/local/content/section/badges }}
|
89 | 89 | </div>
|
90 |
| - {{/notavailable}}</div> |
| 90 | + {{/hasbadge}}</div> |
91 | 91 | {{#imageuri}}
|
92 | 92 | <div class="grid-image card-img-bottom text-center">
|
93 | 93 | <img src="{{imageuri}}" alt="{{imagealttext}}" loading="lazy">
|
|
0 commit comments