first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
@@ -0,0 +1,222 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content
Displays the complete course format.
Example context (json):
{
"initialsection": {
"num": 0,
"id": 34,
"cmlist": {
"cms": [
{
"cmitem": {
"cmformat": {
"cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Forum example</span></a>",
"hasname": "true"
},
"id": 3,
"cmid": 3,
"module": "forum",
"extraclasses": "newmessages",
"anchor": "module-3"
}
}
],
"hascms": true
},
"iscurrent": true,
"summary": {
"summarytext": "Summary text!"
}
},
"sections": [
{
"num": 1,
"id": 35,
"header": {
"name": "Section title",
"url": "#"
},
"cmlist": {
"cms": [
{
"cmitem": {
"cmformat": {
"cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Another forum</span></a>",
"hasname": "true"
},
"id": 4,
"cmid": 4,
"module": "forum",
"extraclasses": "newmessages",
"anchor": "module-4"
}
}
],
"hascms": true
},
"iscurrent": true,
"summary": {
"summarytext": "Summary text!"
}
},
{
"num": 4,
"id": 36,
"header": {
"name": "Section 2 title",
"url": "#"
},
"cmlist": {
"cms": [
{
"cmitem": {
"cmformat": {
"cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Forum example</span></a>",
"hasname": "true"
},
"id": 5,
"cmid": 5,
"module": "forum",
"extraclasses": "newmessages",
"anchor": "module-5"
}
}
],
"hascms": true
},
"iscurrent": true,
"summary": {
"summarytext": "Summary text!"
}
}
],
"format": "topics",
"title": "Course title example",
"hasnavigation": true,
"sectionnavigation": {
"hasprevious": true,
"previousurl": "#",
"larrow": "&#x25C4;",
"previousname": "Section 3",
"hasnext": true,
"rarrow": "&#x25BA;",
"nexturl": "#",
"nextname": "Section 5"
},
"sectionselector": {
"hasprevious": true,
"previousurl": "#",
"larrow": "&#x25C4;",
"previousname": "Section 3",
"hasnext": true,
"rarrow": "&#x25BA;",
"nexturl": "#",
"nextname": "Section 5",
"selector": "<select><option>Section 4</option></select>"
},
"sectionreturn": 1,
"singlesection": {
"num": 5,
"id": 37,
"header": {
"name": "Single Section Example",
"url": "#"
},
"cmlist": {
"cms": [
{
"cmitem": {
"cmformat": {
"cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Assign example</span></a>",
"hasname": "true"
},
"id": 6,
"cmid": 6,
"module": "assign",
"extraclasses": "",
"anchor": "module-6"
}
}
],
"hascms": true
},
"iscurrent": true,
"summary": {
"summarytext": "Summary text!"
}
}
}
}}
<div id="course-format-{{uniqid}}">
<h2 class="accesshide">{{{title}}}</h2>
{{{completionhelp}}}
<ul class="{{format}}" data-for="course_sectionlist">
{{#initialsection}}
{{$ core_courseformat/local/content/section }}
{{> core_courseformat/local/content/section }}
{{/ core_courseformat/local/content/section }}
{{/initialsection}}
{{#sections}}
{{$ core_courseformat/local/content/section }}
{{> core_courseformat/local/content/section }}
{{/ core_courseformat/local/content/section }}
{{/sections}}
</ul>
{{#hasnavigation}}
<div class="single-section">
{{#sectionnavigation}}
{{$ core_courseformat/local/content/sectionnavigation }}
{{> core_courseformat/local/content/sectionnavigation }}
{{/ core_courseformat/local/content/sectionnavigation }}
{{/sectionnavigation}}
<ul class="{{format}}">
{{#singlesection}}
{{$ core_courseformat/local/content/section }}
{{> core_courseformat/local/content/section }}
{{/ core_courseformat/local/content/section }}
{{/singlesection}}
</ul>
{{#sectionselector}}
{{$ core_courseformat/local/content/sectionselector }}
{{> core_courseformat/local/content/sectionselector }}
{{/ core_courseformat/local/content/sectionselector }}
{{/sectionselector}}
</div>
{{/hasnavigation}}
{{#numsections}}
{{^singlesection}}
{{$ core_courseformat/local/content/addsection}}
{{> core_courseformat/local/content/addsection}}
{{/ core_courseformat/local/content/addsection}}
{{/singlesection}}
{{/numsections}}
{{#bulkedittools}}
{{$ core_courseformat/local/content/bulkedittools}}
{{> core_courseformat/local/content/bulkedittools}}
{{/ core_courseformat/local/content/bulkedittools}}
{{/bulkedittools}}
</div>
{{#js}}
require(['core_courseformat/local/content'], function(component) {
component.init('course-format-{{uniqid}}', {}, {{sectionreturn}});
});
{{/js}}
@@ -0,0 +1,68 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/addsection
Displays the add section button inside a course.
Example context (json):
{
"showaddsection": true,
"id": 42,
"insertafter": true,
"num": 0,
"increase": {
"url": "#"
},
"decrease": {
"url": "#"
},
"addsections": {
"url": "#",
"title": "Add section",
"newsection": 3
}
}
}}
{{#showaddsection}}
<div id="course-addsection" class="changenumsections bulk-hidden mt-5">
{{#increase}}
<a href="{{{url}}}" class="increase-sections">
{{#pix}}t/switch_plus, moodle, {{#str}} increasesections, moodle {{/str}}{{/pix}}
</a>
{{/increase}}
{{#decrease}}
<a href="{{{url}}}" class="reduce-sections">
{{#pix}}t/switch_minus, moodle, {{#str}} reducesections, moodle {{/str}}{{/pix}}
</a>
{{/decrease}}
{{#addsections}}
<a href="{{{url}}}"
class="btn add-section d-flex justify-content-center align-items-center p-3"
data-add-sections="{{title}}"
data-new-sections="{{newsection}}"
data-action="addSection"
{{#insertafter}} data-id="{{id}}" {{/insertafter}}
>
{{#pix}} t/add, core {{/pix}}
{{title}}
</a>
{{/addsections}}
</div>
{{/showaddsection}}
@@ -0,0 +1,57 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/availability
Displays the availability contents with excerpt version if needed.
Example context (json):
{
"text": "Not available unless: <ul><li>It is on or after <strong>8 June 2012</strong></li><li>You achieve higher than a certain score in <strong>Course total</strong></li></ul>",
"excerpt": "Not available unless: It is on or after <strong>8 June 2012</strong>",
"editing": true,
"editurl": "/course/editsection.php?id=81&showonly=availabilityconditions"
}
}}
{{^excerpt}}
<div{{#editing}} class="mt-2"{{/editing}}>
{{#pix}}t/unlock, core{{/pix}} {{{text}}}
</div>
{{/excerpt}}
{{#excerpt}}
{{< core/showmore }}
{{$collapsedcontent}}
{{#pix}}t/unlock, core{{/pix}} <span class="availability-excerpt"> {{{excerpt}}} ... </span>
{{/collapsedcontent}}
{{$expandedcontent}}
{{#pix}}t/unlock, core{{/pix}} {{{text}}}
{{/expandedcontent}}
{{$buttonextraclasses}}font-weight-bold{{/buttonextraclasses}}
{{$collapsedextraclasses}}text-truncate pr-2 {{#editing}}mt-2{{/editing}}{{/collapsedextraclasses}}
{{$expandedextraclasses}}
{{^editing}}py-2{{/editing}}
{{#editing}}mt-2 pb-2{{/editing}}
{{/expandedextraclasses}}
{{/core/showmore }}
{{/excerpt}}
{{#editing}}
{{#editurl}}
<div class="editavailability border-top mt-2 py-2">
<a href="{{editurl}}" class="btn btn-sm py-0">{{#pix}} i/edit, core {{/pix}}{{#str}}editsettings, availability{{/str}}</a>
</div>
{{/editurl}}
{{/editing}}
@@ -0,0 +1,39 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/bulkedittoggler
Displays the bulk actions button in the page header.
Example context (json):
{
}
}}
<button
id="bulk-enable-{{uniqid}}"
class="bulkEnable btn text-primary text-nowrap"
data-for="enableBulk" data-coursename="{{coursename}}"
{{#sectiontitle}} data-sectiontitle="{{.}}" {{/sectiontitle}}
{{#sectionname}} data-sectionname="{{.}}" {{/sectionname}}
>
{{#str}} bulkedit, core_courseformat {{/str}} {{#pix}} i/edit, core {{/pix}}
</button>
{{#js}}
require(['core_courseformat/local/content/bulkedittoggler'], function(component) {
component.init('#bulk-enable-{{uniqid}}');
});
{{/js}}
@@ -0,0 +1,92 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/bulkedittools
Displays the bulk actions button in the page header.
Example context (json):
{
"id": 42,
"hasactions": true,
"actions": [
{
"icon": "i/delete",
"action": "cmDelete",
"name": "delete",
"bulk": "cm",
"title": "Delete activities"
}
]
}
}}
{{< core/sticky_footer }}
{{$ stickyclasses }} justify-content-center bulkactions {{/ stickyclasses }}
{{$ disable }} data-disable="true" {{/ disable }}
{{$ extradata }} data-for="bulkedittools" {{/ extradata }}
{{$ stickycontent }}
<div class="form-check">
<input type="checkbox" class="form-check-input" id="selectall" data-for="selectall" disabled>
<label class="form-check-label" for="selectall">
{{#str}} selectall {{/str}}
</label>
</div>
<div class="mx-auto" data-for="bulktools">
{{^hasactions}}
{{#str}} nobulkaction, core_courseformat {{/str}}
{{/hasactions}}
{{#hasactions}}
<ul class="actions nav" data-for="bulkactions">
{{#actions}}
<li class="nav-item">
<button
class="btn py-0 d-flex flex-column"
data-action="{{action}}"
data-bulk="{{bulk}}"
data-for="bulkaction"
{{#title}} title="{{title}}" {{/title}}
>
<span class="bulkaction-icon w-100 pl-2">{{#pix}}{{icon}}{{/pix}}</span>
<span class="bulkaction-name">{{name}}</span>
</button>
</li>
{{/actions}}
</ul>
{{/hasactions}}
</div>
<div class="d-flex flex-column">
<div class="bulkcancel ml-auto">
<button
class="btn pr-0 pb-0"
data-action="bulkcancel"
data-for="bulkcancel"
title="{{#str}} bulkcancel, core_courseformat {{/str}}"
>
{{#pix}} e/cancel, core {{/pix}}
</button>
</div>
<div class="bulkcount" data-for="bulkcount">
{{#str}} bulkselection, core_courseformat, 0 {{/str}}
</div>
</div>
{{/ stickycontent }}
{{/ core/sticky_footer }}
{{#js}}
require(['core_courseformat/local/content/bulkedittools'], function(component) {
component.init('[data-for="bulkedittools"]');
});
{{/js}}
@@ -0,0 +1,78 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/cm
Displays a course module instance inside a course section.
Example context (json):
{
"cmname": {
"displayvalue" : "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Activity example</span></a>"
},
"hasname": "true",
"afterlink": "<span class=\"badge bg-primary\">30 unread messages</span>",
"hasextras": true,
"extras": ["<span class=\"badge bg-secondary\">[extras]</span>"],
"activityinfo": {
"hasmodavailability": true,
"activityname": "Activity example",
"hascompletion": true,
"uservisible": true,
"hasdates": true,
"isautomatic": true,
"istrackeduser": true,
"activitydates": [
{
"label": "Opens:",
"datestring": "6 April 2021, 6:46 PM"
}
],
"completiondetails": [
{
"statuscomplete": 1,
"description": "Viewed"
},
{
"statusincomplete": 1,
"description": "Receive a grade"
}
]
},
"modstealth": true,
"indent": 1
}
}}
{{#editing}}
{{< core_courseformat/local/content/divider}}
{{$content}}{{> core_course/activitychooserbuttonactivity}}{{/content}}
{{/ core_courseformat/local/content/divider}}
{{/editing}}
<div class="activity-item focus-control {{#modstealth}}hiddenactivity{{/modstealth}}{{!
}}{{#modhiddenfromstudents}}hiddenactivity{{/modhiddenfromstudents}}{{!
}}{{#modinline}}activityinline{{/modinline}}" data-activityname="{{activityname}}" data-region="activity-card">
{{$ core_courseformat/local/content/cm/bulkselect }}
{{> core_courseformat/local/content/cm/bulkselect }}
{{/ core_courseformat/local/content/cm/bulkselect }}
{{!
Place the actual content of the activity-item in a separate template to make it easier for other formats to add
additional content to the activity wrapper.
}}
{{$ core_courseformat/local/content/cm/activity }}
{{> core_courseformat/local/content/cm/activity }}
{{/ core_courseformat/local/content/cm/activity }}
</div>
@@ -0,0 +1,160 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/cm/activity
Display the activity content of a cm.
Example context (json):
{
"cmname": {
"displayvalue" : "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Activity example</span></a>"
},
"hasname": "true",
"afterlink": "<span class=\"resourcelinkdetails\">24.7&nbsp;KB · Uploaded 26/05/23, 16:29</span>",
"activitybadge": {
"badgecontent": "PDF",
"badgestyle": "badge-none",
"badgeurl": "http://example.org/help",
"badgeelementid": "myelementid",
"badgeextraattributes": [
{
"name": "data-el1name",
"value": "el1value"
},
{
"name": "data-el2name",
"value": "el2value"
}
]
},
"hasextras": true,
"extras": ["<span class=\"badge bg-secondary\">[extras]</span>"],
"activityinfo": {
"hasmodavailability": true,
"activityname": "Activity example",
"hascompletion": true,
"uservisible": true,
"hasdates": true,
"isautomatic": true,
"istrackeduser": true,
"activitydates": [
{
"label": "Opens:",
"datestring": "6 April 2021, 6:46 PM"
}
],
"completiondetails": [
{
"statuscomplete": 1,
"description": "Viewed"
},
{
"statusincomplete": 1,
"description": "Receive a grade"
}
]
},
"visibility": {
"isInteractive": false,
"modhiddenfromstudents": true
}
}
}}
{{#moveicon}} {{{moveicon}}} {{/moveicon}}
<div class="activity-grid {{^hasname}}noname-grid{{/hasname}}">
{{! Icon, Name & Badge }}
{{#hasname}}
{{#cmname}}
{{$ core_courseformat/local/content/cm/cmname }}
{{> core_courseformat/local/content/cm/cmname }}
{{/ core_courseformat/local/content/cm/cmname }}
{{/cmname}}
{{/hasname}}
{{! Dates }}
{{#dates}}
{{#hasdates}}
<div data-region="activity-dates" class="activity-dates mr-sm-2">
{{#activitydates}}
{{$core_course/activity_date}}
{{>core_course/activity_date}}
{{/core_course/activity_date}}
{{/activitydates}}
</div>
{{/hasdates}}
{{/dates}}
{{! Visibility }}
{{$ core_courseformat/local/content/cm/badges }}
{{> core_courseformat/local/content/cm/badges }}
{{/ core_courseformat/local/content/cm/badges }}
{{! Group mode }}
{{#groupmodeinfo}}
<div
class="activity-groupmode-info align-self-start ml-sm-2"
data-region="groupmode"
>
{{$ core_courseformat/local/content/cm/groupmode}}
{{> core_courseformat/local/content/cm/groupmode}}
{{/ core_courseformat/local/content/cm/groupmode}}
</div>
{{/groupmodeinfo}}
{{! Completion }}
{{#completion}}
{{#hascompletion}}
<div class="activity-completion align-self-start ml-sm-2">
{{$ core_courseformat/local/content/cm/activity_info}}
{{> core_courseformat/local/content/cm/activity_info}}
{{/ core_courseformat/local/content/cm/activity_info}}
</div>
{{/hascompletion}}
{{/completion}}
{{! Action menu }}
{{#controlmenu}}
<div class="activity-actions bulk-hidden align-self-start ml-sm-2">
{{$ core_courseformat/local/content/cm/controlmenu }}
{{> core_courseformat/local/content/cm/controlmenu }}
{{/ core_courseformat/local/content/cm/controlmenu }}
</div>
{{/controlmenu}}
{{! Description }}
{{#altcontent}}
<div class="activity-altcontent d-flex text-break {{#hasname}}activity-description{{/hasname}}">
{{{altcontent}}}
</div>
{{/altcontent}}
{{! Availability }}
{{#modavailability}}
{{$ core_courseformat/local/content/cm/availability }}
{{> core_courseformat/local/content/cm/availability }}
{{/ core_courseformat/local/content/cm/availability }}
{{/modavailability}}
{{! Afterlink }}
{{#afterlink}}
<div class="activity-afterlink afterlink d-flex align-items-center">
{{{afterlink}}}
</div>
{{/afterlink}}
</div>
@@ -0,0 +1,70 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/cm/activity_info
Container to display activity information on the course page such as:
- Activity completion requirements (automatic completion)
- Manual completion button
Example context (json):
{
"cmid": 123,
"activityname": "Course announcements",
"hascompletion": true,
"uservisible": true,
"completiondialog": {
"buttoncontent": "To do",
"dialogcontent": "You must view this activity to complete it.",
"buttonclasses": "btn btn-sm btn-outline-secondary dropdown-toggle",
"classes": "completion-dropdown"
},
"isautomatic": true,
"showmanualcompletion": true,
"completiondetails": [
{
"statuscomplete": 1,
"description": "Viewed"
},
{
"statusincomplete": 1,
"description": "Receive a grade"
}
]
}
}}
<div data-region="activity-information" data-activityname="{{activityname}}" class="activity-information">
{{#uservisible}}
<div data-region="completion-info">
{{! Completion dropdown dialog }}
{{#completiondialog}}
<div data-region="completionrequirements" aria-label="{{#str}}completionrequirements, core_course, {{activityname}}{{/str}}">
{{> core/local/dropdown/dialog }}
</div>
{{/completiondialog}}
{{! Manual completion button }}
{{#showmanualcompletion}}
{{#istrackeduser}}
{{$ core_course/completion_manual }}
{{> core_course/completion_manual }}
{{/ core_course/completion_manual }}
{{/istrackeduser}}
{{/showmanualcompletion}}
</div>
{{/uservisible}}
</div>
@@ -0,0 +1,55 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/cm/activitybadge
Container to display activity badge information such as:
- Unread messages for forums
- File types for resources
Example context (json):
{
"badgecontent": "PDF",
"badgestyle": "badge-none",
"badgeurl": "http://example.org/help",
"badgeelementid": "myelementid",
"badgeextraattributes": [
{
"name": "data-el1name",
"value": "el1value"
},
{
"name": "data-el2name",
"value": "el2value"
}
]
}
}}
<span
{{#badgeelementid}}id="{{.}}"{{/badgeelementid}}
class="ml-1"
{{#badgeextraattributes}} {{name}}="{{value}}" {{/badgeextraattributes}}
>
<span class="activitybadge badge rounded-pill {{badgestyle}}">
{{#badgeurl}}
<a href="{{.}}">{{badgecontent}}</a>
{{/badgeurl}}
{{^badgeurl}}
{{badgecontent}}
{{/badgeurl}}
</span>
</span>
@@ -0,0 +1,48 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/cm/availability
Displays a activity availability.
Example context (json):
{
"info": [
{
"classes": "",
"text": "Not available unless: <ul><li>It is on or after <strong>8 June 2012</strong></li></ul>",
"ishidden": 0,
"isstealth": 0,
"isrestricted": 1,
"isfullinfo": 1
}
],
"hasmodavailability": true
}
}}
{{#hasmodavailability}}
{{#info}}
<div class="activity-availability availabilityinfo {{classes}}" data-region="availabilityinfo">
{{^isrestricted}}
<span class="badge rounded-pill bg-warning text-dark">{{{text}}}</span>
{{/isrestricted}}
{{#isrestricted}}
{{> core_courseformat/local/content/availability }}
{{/isrestricted}}
</div>
{{/info}}
{{/hasmodavailability}}
@@ -0,0 +1,96 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/cm/availabilitymodal
Displays the activity availability modal form.
Example context (json):
{
"allowstealth": true
}
}}
<div class="d-flex flex-column p-3">
<form>
<div class="d-flex flex-row align-items-start py-3 border-bottom">
<input
class="mt-3 mx-2"
type="radio"
id="showRadio"
name="option"
value="cmShow"
aria-describedby="showRadio_help"
>
<div class="icon-box mx-2">
{{#pix}} t/hide, core {{/pix}}
</div>
<div class="w-100">
<label class="mb-1" for="showRadio">
{{#str}} availability_show, core_courseformat {{/str}}
</label>
<div id="showRadio_help" class="small text-muted">
{{#str}} availability_show_help, core_courseformat {{/str}}
</div>
</div>
</div>
<div class="d-flex flex-row align-items-start py-3 {{#allowstealth}} border-bottom {{/allowstealth}}">
<input
class="mt-3 mx-2"
type="radio"
id="hideRadio"
name="option"
value="cmHide"
aria-describedby="hideRadio_help"
>
<div class="icon-box mx-2">
{{#pix}} t/show, core {{/pix}}
</div>
<div class="w-100">
<label class="mt-1" for="hideRadio">
{{#str}} availability_hide, core_courseformat {{/str}}
</label>
<div id="hideRadio_help" class="small text-muted">
{{#str}} availability_hide_help, core_courseformat {{/str}}
</div>
</div>
</div>
{{#allowstealth}}
<div class="d-flex flex-row align-items-start py-3">
<input
class="mt-3 mx-2"
type="radio"
id="stealthRadio"
name="option"
value="cmStealth"
aria-describedby="stealthRadio_help"
>
<div class="icon-box mx-2">
{{#pix}} t/stealth, core {{/pix}}
</div>
<div class="w-100">
<label class="mt-1" for="stealthRadio">
{{#str}} availability_stealth, core_courseformat {{/str}}
</label>
<div id="stealthRadio_help" class="small text-muted">
{{#str}} availability_stealth_help, core_courseformat {{/str}}
</div>
</div>
</div>
{{/allowstealth}}
</form>
</div>
@@ -0,0 +1,35 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/cm/badges
Formats can override this template to display extra badges.
Example context (json):
{
"visibility": {
"isInteractive": false,
"modhiddenfromstudents" : "1",
"modstealth" : "1"
}
}
}}
{{#visibility}}
{{$ core_courseformat/local/content/cm/visibility }}
{{> core_courseformat/local/content/cm/visibility }}
{{/ core_courseformat/local/content/cm/visibility }}
{{/visibility}}
@@ -0,0 +1,39 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/cm/bulkselect
Displays an activity bulk selector.
Example context (json):
{
"activityname": "Activity example",
"cmid": 42
}
}}
<div class="bulkselect d-none" data-for="cmBulkSelect">
<input
id="cmCheckbox{{cmid}}"
type="checkbox"
data-id="{{cmid}}"
data-action="toggleSelectionCm"
data-bulkcheckbox="1"
>
<label class="sr-only" for="cmCheckbox{{cmid}}">
{{#str}} selectcm, core_courseformat, {{activityname}}{{/str}}
</label>
</div>
@@ -0,0 +1,42 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/cm/cmicon
Displays a course module icon.
Example context (json):
{
"icon": "../../../pix/help.svg",
"iconclass": "",
"purpose": "content",
"branded": 0,
"modname": "resource",
"pluginname": "File",
"showtooltip": 1
}
}}
<div class="activity-icon activityiconcontainer smaller {{purpose}} {{#branded}}isbranded{{/branded}} courseicon align-self-start mr-2">
<img
src="{{{icon}}}"
class="activityicon {{iconclass}}"
data-region="activity-icon"
data-id="{{cmid}}"
alt="{{#showtooltip}}{{#cleanstr}} activityicon, moodle, {{{pluginname}}} {{/cleanstr}}{{/showtooltip}}"
{{#showtooltip}}title="{{{pluginname}}}"{{/showtooltip}}
>
</div>
@@ -0,0 +1,75 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/cm/cmname
Convenience mustache to displays a course module inplace editable from the format renderer.
Format plugins are free to implement an alternative inplace editable for activities.
Example context (json):
{
"url": "#",
"pluginname": "File",
"textclasses": "",
"modname": "resource",
"activityicon": {
"icon": "../../../pix/help.svg",
"iconclass": "",
"purpose": "content"
},
"activityname": {
"displayvalue" : "<a href=\"#\">Moodle</a>",
"value" : "Moodle",
"itemid" : "1",
"component" : "core_unknown",
"itemtype" : "unknown",
"edithint" : "Edit this",
"editlabel" : "New name for this",
"type" : "text",
"options" : "",
"linkeverything": 0
}
}
}}
{{#url}}
{{! Icon }}
{{#activityicon}}
{{$ core_courseformat/local/content/cm/cmicon }}
{{> core_courseformat/local/content/cm/cmicon }}
{{/ core_courseformat/local/content/cm/cmicon }}
{{/activityicon}}
{{! Name & Badge}}
<div class="activity-name-area activity-instance d-flex flex-column mr-2">
<div class="activitytitle {{textclasses}} modtype_{{modname}} position-relative align-self-start">
<div class="activityname">
{{#activityname}}
{{$ core/inplace_editable }}
{{> core/inplace_editable }}
{{/ core/inplace_editable }}
{{/activityname}}
{{#activitybadge}}
{{$ core_courseformat/local/content/cm/activitybadge }}
{{> core_courseformat/local/content/cm/activitybadge }}
{{/ core_courseformat/local/content/cm/activitybadge }}
{{/activitybadge}}
</div>
</div>
</div>
{{/url}}
@@ -0,0 +1,121 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/cm/completion_dialog
Container to display activity completion dialog content.
Example context (json):
{
"istrackeduser": true,
"hasconditions": true,
"completiondetails": [
{
"statuscomplete": 1,
"description": "View"
},
{
"statusincomplete": 1,
"description": "Receive a grade"
}
]
}
}}
<div class="completion-dialog px-2">
{{! Completion criterias. }}
{{#hasconditions}}
{{! Dialog header. }}
{{#istrackeduser}}
<strong>{{#str}}youmust, completion{{/str}}</strong>
{{/istrackeduser}}
{{^istrackeduser}}
<strong>{{#str}}studentsmust, completion{{/str}}</strong>
{{/istrackeduser}}
<div class="ml-2" role="list">
{{#completiondetails}}
{{! Show completion status and description to tracked users. }}
{{#istrackeduser}}
{{#statuscomplete}}
<div class="d-flex mt-2 text-success" role="listitem" {{#accessibledescription}}title="{{.}}" aria-label="{{.}}"{{/accessibledescription}}>
<div>
{{#pix}}i/checked{{/pix}}
<span class="sr-only">{{#str}}completion_automatic:done, core_course{{/str}}</span>
</div>
<span>{{description}}</span>
</div>
{{/statuscomplete}}
{{#statuscompletefail}}
<div class="d-flex mt-2 text-danger" role="listitem" {{#accessibledescription}}title="{{.}}" aria-label="{{.}}"{{/accessibledescription}}>
<div>
{{#pix}}e/cancel{{/pix}}
<span class="sr-only">{{#str}}completion_automatic:failed, core_course{{/str}}</span>
</div>
<span>{{description}}</span>
</div>
{{/statuscompletefail}}
{{#statusincomplete}}
<div class="d-flex mt-2" role="listitem" {{#accessibledescription}}title="{{.}}" aria-label="{{.}}"{{/accessibledescription}}>
<div>
{{#pix}}i/dot{{/pix}}
<span class="sr-only">{{#str}}completion_automatic:todo, core_course{{/str}}</span>
</div>
<span>{{description}}</span>
</div>
{{/statusincomplete}}
{{/istrackeduser}}
{{! Show only description (without status) to non-tracked users. }}
{{^istrackeduser}}
<div class="d-flex mt-2" role="listitem">
<div>{{#pix}}i/dot{{/pix}}</div>
<span>{{description}}</span>
</div>
{{/istrackeduser}}
{{/completiondetails}}
{{! Show also manual completion description in the list to non-tracked users. }}
{{#ismanual}}
{{^istrackeduser}}
<div class="d-flex mt-2" role="listitem">
<div>{{#pix}}i/dot{{/pix}}</div>
<span>{{#str}} completion_manual:markdone, core_course {{/str}}</span>
</div>
{{/istrackeduser}}
{{/ismanual}}
</div>
{{/hasconditions}}
{{! Show message if there are no completion criterias. }}
{{^hasconditions}}
{{#istrackeduser}}
<span>{{#str}}emptyconditionsinfo, completion{{/str}}</span>
{{/istrackeduser}}
{{^istrackeduser}}
<span class="text-danger">{{#pix}} req, core {{/pix}}{{#str}}emptyconditionswarning, completion{{/str}}</span>
{{/istrackeduser}}
{{/hasconditions}}
{{! Show edit link to editing teachers. }}
{{#editing}}
{{#editurl}}
<div class="editcompletion bulk-hidden border-top mt-3 pt-3">
<a href="{{editurl}}" class="btn btn-sm px-2 py-0">
{{#hasconditions}}{{#pix}} i/edit, core {{/pix}}{{#str}}editconditions, completion{{/str}}{{/hasconditions}}
{{^hasconditions}}{{#pix}} t/add, core {{/pix}}{{#str}}addconditions, completion{{/str}}{{/hasconditions}}
</a>
</div>
{{/editurl}}
{{/editing}}
</div>
@@ -0,0 +1,37 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/cm/controlmenu
Displays an activity control menu (dropdown menu).
Example context (json):
{
"menu": "<a href=\"#\" class=\"d-inline-block dropdown-toggle icon-no-margin\">Edit<b class=\"caret\"></b></a>",
"hasmenu": true
}
}}
{{#hasmenu}}
<div class="cm_action_menu actions" data-cmid="{{id}}" data-region="actionmenu">
{{#menu}}
{{$ core/action_menu }}
{{> core/action_menu }}
{{/ core/action_menu }}
{{/menu}}
{{#afterediticons}} {{{.}}} {{/afterediticons}}
</div>
{{/hasmenu}}
@@ -0,0 +1,54 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/cm/groupmode_info
Container to display group mode information on the course page.
Example context (json):
{
"activityname": "Course announcements",
"groupicon": "i/groupv",
"groupalt": "Visible groups"
}
}}
{{#isInteractive}}
{{#dropwdown}}
{{< core/local/dropdown/status}}
{{$ buttonclasses }}
{{#autohide}} v-parent-focus {{/autohide}}
groupmode-information btn btn-icon icon-no-margin
{{/ buttonclasses }}
{{$ buttoncontent }}
{{{groupicon}}}
<span class="groupmode-icon-info">{{groupalt}}</span>
{{/ buttoncontent }}
{{/ core/local/dropdown/status}}
{{/dropwdown}}
{{/isInteractive}}
{{^isInteractive}}
<div
data-region="groupmode-information"
data-activityname="{{activityname}}"
class="groupmode-information d-flex align-items-center justify-content-center icon-no-margin"
>
{{#groupicon}}{{{groupicon}}}{{/groupicon}}
{{#groupalt}}
<div class="groupmode-icon-info ml-1">{{groupalt}}</div>
{{/groupalt}}
</div>
{{/isInteractive}}
@@ -0,0 +1,42 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/cm/title
Displays a course module instance inside a course section.
Example context (json):
{
"url": "#",
"instancename": "Activity name",
"uservisible": true,
"onclick": "alert('ok')",
"altname": "PDF file",
"linkclasses": "",
"modname": "resource"
}
}}
{{#uservisible}}
<a href="{{url}}" class="{{linkclasses}} aalink stretched-link" onclick="{{{onclick}}}">
<span class="instancename">{{{instancename}}} {{{altname}}}</span>
</a>
{{/uservisible}}
{{^uservisible}}
<span class="instancename">
{{{instancename}}} {{{altname}}}
</span>
{{/uservisible}}
@@ -0,0 +1,86 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/cm/visibility
Template to displays if an activity is in hidden or stealth mode.
Example context (json):
{
"modhiddenfromstudents" : "1",
"modstealth" : "1",
"isInteractive": "1",
"dropwdown": {
"buttonid": "dropwdownbutton_648b1549b929e30",
"buttoncontent": "Show on course page",
"choices": {
"description": null,
"options": [
{
"value": "show",
"name": "Show on course page",
"description": "Available to students.",
"url": null,
"icon": null,
"disabled": false,
"hasicon": false,
"hasurl": false,
"selected": true,
"optionnumber": 1,
"first": true,
"optionuniqid": "choice_option_648b1549b929e31"
},
{
"value": "hide",
"name": "Hide on course page",
"description": "Not available to students.",
"url": null,
"icon": null,
"disabled": false,
"hasicon": false,
"hasurl": false,
"optionnumber": 2,
"first": false,
"optionuniqid": "choice_option_648b1549b929e32"
}
],
"hasoptions": true
}
}
}
}}
{{#isInteractive}}
<div class="activity-badges my-1" data-region="visibility">
{{#dropwdown}}
{{< core/local/dropdown/status}}
{{$ buttonclasses }} badge rounded-pill bg-secondary text-dark dropdown-toggle border-0 {{/ buttonclasses }}
{{/ core/local/dropdown/status}}
{{/dropwdown}}
</div>
{{/isInteractive}}
{{^isInteractive}}
{{#modhiddenfromstudents}}
<div class="activity-badges my-1 d-flex align-self-start align-items-center" data-region="visibility">
<span class="badge rounded-pill bg-secondary text-dark">{{#pix}}i/show, core{{/pix}}{{#str}}hiddenfromstudents{{/str}}</span>
</div>
{{/modhiddenfromstudents}}
{{#modstealth}}
<div class="activity-badges my-1 d-flex align-self-start align-items-center" data-region="visibility">
<span class="badge rounded-pill bg-secondary text-dark">{{#pix}}t/stealth, core{{/pix}}{{#str}}hiddenoncoursepage{{/str}}</span>
</div>
{{/modstealth}}
{{/isInteractive}}
@@ -0,0 +1,34 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/divider
Displays a dashed divider.
Example context (json):
{
"extraclasses": "mt-3",
"content": "<button class=\"btn btn-primary\">Add section</button>"
}
}}
<div class="divider bulk-hidden d-flex justify-content-center align-items-center {{$extraclasses}}{{extraclasses}}{{/extraclasses}}">
<hr>
<div class="divider-content px-3">
{{$content}}{{content}}{{/content}}
</div>
</div>
@@ -0,0 +1,46 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/frontpagesection
Displays the frontpage section 1 (site home).
Example context (json):
{
"sections": [
"<li>This is the section content</li>"
],
"showsettings": true,
"settingsurl": "#"
}
}}
<div class="course-content">
{{#showsettings}}
<div class="mb-2">
<a href="{{{settingsurl}}}" title="{{#str}} edit {{/str}}" aria-label="{{#str}} edit {{/str}}">
{{#pix}} t/edit, moodle {{/pix}}
</a>
</div>
{{/showsettings}}
<div class="sitetopic">
<ul class="topics frontpage">
{{#sections}}
{{> core_courseformat/local/content/section }}
{{/sections}}
</ul>
</div>
</div>
@@ -0,0 +1,137 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/movecm
Displays the course index.
Example context (json):
{
"cmname": "Activity name",
"cmid": 42,
"sections": [
{
"title": "General",
"id": 42,
"number": 1,
"sectionurl": "#",
"hascms": true,
"cms": [
{
"name": "Glossary of characters",
"id": "10",
"url": "#"
},
{
"name": "World Cinema forum",
"id": "11",
"url": "#"
},
{
"name": "Announcements",
"id": "12",
"url": "#"
}
]
},
{
"title": "City of God or Cidade de Deus",
"id": "43",
"number": "2",
"sectionurl": "#",
"hascms": true,
"cms": [
{
"name": "Resources",
"id": "13",
"url": "#"
},
{
"name": "Studying City of God by Stephen Smith Bergman-Messerschmidt",
"id": "14",
"url": "#"
},
{
"name": "Film education study guide",
"id": "15",
"url": "#"
}
]
}
]
}
}}
<p data-for="sectionname">{{information}}:</p>
<nav class="collapse-list" id="destination-selector" role="tree">
{{#sections}}
<div data-for="sectionnode"
role="treeitem"
>
<div class="collapse-list-item d-flex"
id="movemodalsection{{number}}"
data-for="section_item"
>
<a data-toggle="collapse"
href="#movemodalcollapse{{number}}"
aria-expanded="false"
aria-controls="movemodalcollapse{{number}}"
class="collapse-list-link icons-collapse-expand collapsed"
>
<span class="collapsed-icon icon-no-margin mr-1"
data-toggle="tooltip" title="{{#str}} expand, core {{/str}}">
{{#pix}} t/collapsed, core {{/pix}}
<span class="sr-only">{{#str}} expand, core {{/str}}</span>
</span>
<span class="expanded-icon icon-no-margin mr-1"
data-toggle="tooltip" title="{{#str}} collapse, core {{/str}}">
{{#pix}} t/expanded, core {{/pix}}
<span class="sr-only">{{#str}} collapse, core {{/str}}</span>
</span>
</a>
<a href="#"
class="collapse-list-link text-truncate"
data-for="section"
data-id="{{id}}"
data-number="{{number}}"
>
{{{title}}}
</a>
<span class="dragicon ml-auto">{{#pix}}i/dragdrop{{/pix}}</span>
</div>
<div id="movemodalcollapse{{number}}"
class="collapse-list-item-content collapse"
aria-labelledby="movemodalsection{{number}}"
role="group"
>
<ul class="unlist" data-for="cmlist" data-id="{{id}}">
{{#cms}}
<li class="collapse-list-item d-flex" role="treeitem">
<a class="collapse-list-link text-truncate"
href="#"
data-for="cm"
data-id="{{id}}"
>
{{{name}}}
</a>
</li>
{{/cms}}
</ul>
</div>
</div>
{{/sections}}
</nav>
@@ -0,0 +1,66 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/movesection
Displays the course index.
Example context (json):
{
"sectionid": 23,
"sectiontitle": "Section title",
"sections": [
{
"title": "General",
"id": 42,
"number": 1,
"sectionurl": "#",
"indexcollapsed": 0
},
{
"title": "City of God or Cidade de Deus",
"id": "43",
"number": "2",
"sectionurl": "#",
"indexcollapsed": 1
}
]
}
}}
{{#information}}
<p data-for="sectionname">
{{information}}:
</p>
{{/information}}
<nav class="collapse-list" id="destination-selector" role="tree">
{{#sections}}
<div
class="collapse-list-item"
role="treeitem"
>
<a href="#"
class="collapse-list-link text-truncate"
data-for="section"
data-id="{{id}}"
data-number="{{number}}"
>
{{{title}}}
</a>
</div>
{{/sections}}
</nav>
@@ -0,0 +1,118 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/section
Displays a course section.
Note: This template is a wrapper around the section/content template to allow course formats and theme designers to
modify parts of the wrapper without having to copy/paste the entire template.
Example context (json):
{
"num": 3,
"id": 35,
"controlmenu": "[tools menu]",
"header": {
"name": "Section title",
"title": "<a href=\"http://moodle/course/view.php?id=5#section-0\">Section title</a>",
"url": "#",
"ishidden": true
},
"cmlist": {
"cms": [
{
"cmitem": {
"cmformat": {
"cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Forum example</span></a>",
"hasname": "true"
},
"id": 3,
"module": "forum",
"anchor": "activity-3",
"extraclasses": "newmessages"
}
},
{
"cmitem": {
"cmformat": {
"cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Assign example</span></a>",
"hasname": "true"
},
"id": 4,
"anchor": "activity-4",
"module": "assign",
"extraclasses": ""
}
}
],
"hascms": true
},
"ishidden": false,
"iscurrent": true,
"currentlink": "<span class=\"accesshide\">This topic</span>",
"availability": {
"info": "<span class=\"badge bg-info\">Hidden from students</span>",
"hasavailability": true
},
"summary": {
"summarytext": "Summary text!"
},
"controlmenu": {
"menu": "<a href=\"#\" class=\"d-inline-block dropdown-toggle icon-no-margin\">Edit<b class=\"caret\"></b></a>",
"hasmenu": true
},
"cmcontrols": "[Add an activity or resource]",
"iscoursedisplaymultipage": true,
"sectionreturnid": 0,
"contentcollapsed": false,
"insertafter": true,
"numsections": 42,
"sitehome": false,
"highlightedlabel" : "Highlighted"
}
}}
<li id="section-{{num}}"
class="section course-section main {{#onlysummary}} section-summary {{/onlysummary}} clearfix
{{#ishidden}} hidden {{/ishidden}} {{#iscurrent}}{{^displayonesection}} current {{/displayonesection}}{{/iscurrent}}
{{#isstealth}} orphaned {{/isstealth}}"
data-sectionid="{{num}}"
data-sectionreturnid="{{sectionreturnid}}"
data-for="section"
data-id="{{id}}"
data-number="{{num}}"
>
<div class="section-item">
<div class="course-section-header d-flex"
data-for="section_title"
data-id="{{id}}"
data-number="{{num}}"
>
{{$ core_courseformat/local/content/section/content }}
{{> core_courseformat/local/content/section/content }}
{{/ core_courseformat/local/content/section/content }}
</div>
</div>
{{#insertafter}}
{{#numsections}}
{{$ core_courseformat/local/content/addsection}}
{{> core_courseformat/local/content/section/addsectiondivider }}
{{/ core_courseformat/local/content/addsection}}
{{/numsections}}
{{/insertafter}}
</li>
@@ -0,0 +1,56 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/section/addsectiondivider
Displays the add section divider inside a section.
Example context (json):
{
"showaddsection": true,
"id": 42,
"insertafter": true,
"num": 0,
"addsections": {
"url": "#",
"title": "Add section",
"newsection": 3
}
}
}}
{{#showaddsection}}
<div class="changenumsections bulk-hidden" data-region="section-addsection">
{{#addsections}}
{{< core_courseformat/local/content/divider}}
{{$extraclasses}}always-hidden mt-2{{/extraclasses}}
{{$content}}
<a href="{{{url}}}"
class="btn add-content section-modchooser section-modchooser-link activitychooser-button d-flex justify-content-center align-items-center p-1 icon-no-margin"
data-add-sections="{{title}}"
data-new-sections="{{newsection}}"
data-action="addSection"
{{#insertafter}} data-id="{{id}}" {{/insertafter}}
title="{{title}}"
>
{{#pix}} t/add, core {{/pix}}
<span class="sr-only">{{title}}</span>
</a>
{{/content}}
{{/ core_courseformat/local/content/divider}}
{{/addsections}}
</div>
{{/showaddsection}}
@@ -0,0 +1,49 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/section/availability
Displays a section availability.
The 3.x version course edition requires an existing section_availability div.
Example context (json):
{
"info": [
{
"text": "Not available unless: <ul><li>It is on or after <strong>8 June 2012</strong></li></ul>",
"isrestricted": 1,
"isfullinfo": 1
}
],
"hasavailability": true
}
}}
<div class="section_availability">
{{#hasavailability}}
{{#info}}
<div class="availabilityinfo {{classes}}" data-region="availabilityinfo">
{{^isrestricted}}
<span class="badge rounded-pill bg-warning text-dark">{{{text}}}</span>
{{/isrestricted}}
{{#isrestricted}}
{{> core_courseformat/local/content/availability }}
{{/isrestricted}}
</div>
{{/info}}
{{/hasavailability}}
</div>
@@ -0,0 +1,72 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/section/availabilitymodal
Displays the section availability modal form.
Example context (json):
{
}
}}
<div class="d-flex flex-column p-3">
<form>
<div class="d-flex flex-row align-items-start py-3 border-bottom">
<input
class="mt-3 mx-2"
type="radio"
id="showSectionRadio"
name="option"
value="sectionShow"
aria-describedby="showRadio_help"
>
<div class="icon-box mx-2">
{{#pix}} t/hide, core {{/pix}}
</div>
<div class="w-100">
<label class="mb-1" for="showSectionRadio">
{{#str}} availability_show, core_courseformat {{/str}}
</label>
<div id="showRadio_help" class="small text-muted">
{{#str}} availability_show_help, core_courseformat {{/str}}
</div>
</div>
</div>
<div class="d-flex flex-row align-items-start py-3">
<input
class="mt-3 mx-2"
type="radio"
id="hideSectionRadio"
name="option"
value="sectionHide"
aria-describedby="hideRadio_help"
>
<div class="icon-box mx-2">
{{#pix}} t/show, core {{/pix}}
</div>
<div class="w-100">
<label class="mb-1" for="hideSectionRadio">
{{#str}} availability_hide, core_courseformat {{/str}}
</label>
<div id="hideRadio_help" class="small text-muted">
{{#str}} availability_hide_help, core_courseformat {{/str}}
</div>
</div>
</div>
</form>
</div>
@@ -0,0 +1,82 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/section/badges
Convenience mustache to displays if an activity is in hidden or stealth mode.
Format plugins are free to implement an alternative inplace editable for activities.
Example context (json):
{
"iscurrent" : true,
"highlightedlabel" : "Highlighted",
"visibility": {
"editing": "1",
"dropwdown": {
"buttonid": "dropwdownbutton_648b1549b929e30",
"buttoncontent": "Show on course page",
"choices": {
"description": null,
"options": [
{
"value": "show",
"name": "Show on course page",
"description": "Available to students.",
"url": null,
"icon": null,
"disabled": false,
"hasicon": false,
"hasurl": false,
"selected": true,
"optionnumber": 1,
"first": true,
"optionuniqid": "choice_option_648b1549b929e31"
},
{
"value": "hide",
"name": "Hide on course page",
"description": "Not available to students.",
"url": null,
"icon": null,
"disabled": false,
"hasicon": false,
"hasurl": false,
"optionnumber": 2,
"first": false,
"optionuniqid": "choice_option_648b1549b929e32"
}
],
"hasoptions": true
}
}
}
}
}}
{{#editing}}
<span class="badge rounded-pill bg-primary text-white order-1 {{^iscurrent}}d-none{{/iscurrent}}" data-type="iscurrent">
{{ highlightedlabel }}
</span>
{{/editing}}
{{^editing}}
{{#iscurrent}}
<span class="badge rounded-pill bg-primary text-white order-1">{{ highlightedlabel }}</span>
{{/iscurrent}}
{{/editing}}
{{#visibility}}
{{>core_courseformat/local/content/section/visibility}}
{{/visibility}}
@@ -0,0 +1,42 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/section/bulkselect
Displays an section bulk selector.
Example context (json):
{
"id": 35,
"name": "Section title"
}
}}
<div class="bulkselect align-self-center d-none" data-for="sectionBulkSelect">
<input
id="sectionCheckbox{{id}}"
type="checkbox"
data-id="{{id}}"
data-action="toggleSelectionSection"
data-bulkcheckbox="1"
>
<label class="sr-only" for="sectionCheckbox{{id}}">
{{#selecttext}} {{selecttext}} {{/selecttext}}
{{^selecttext}}
{{#str}} selectsection, core_courseformat, {{name}}{{/str}}
{{/selecttext}}
</label>
</div>
@@ -0,0 +1,52 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/section/cmitem
Displays the course module list inside a course section.
Example context (json):
{
"cmformat": {
"cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Activity example</span></a>",
"hasname": "true",
"moveicon": "<i>[Move]</i>",
"indent": 2,
"afterlink": "<span class=\"badge bg-primary\">30 unread messages</span>",
"hasextras": true,
"extras": ["<span class=\"badge bg-secondary\">[extras]</span>"],
"completion": "<span class=\"badge bg-success\">Completed!</span>"
},
"id": 3,
"anchor": "module-3",
"module": "forum",
"extraclasses": "newmessages",
"indent": 0
}
}}
<li
class="activity activity-wrapper {{module}} modtype_{{module}} {{extraclasses}} {{#hasinfo}}hasinfo{{/hasinfo}} {{#indent}}indented{{/indent}}"
id="{{anchor}}"
data-for="cmitem"
data-id="{{id}}"
>
{{#cmformat}}
{{$ core_courseformat/local/content/cm}}
{{> core_courseformat/local/content/cm}}
{{/ core_courseformat/local/content/cm}}
{{/cmformat}}
</li>
@@ -0,0 +1,77 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/section/cmlist
Displays the course module list inside a course section.
Example context (json):
{
"cms": [
{
"cmitem": {
"cmformat": {
"cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Forum example</span></a>",
"hasname": "true"
},
"id": 3,
"module": "forum",
"extraclasses": "newmessages"
}
},
{
"cmitem": {
"cmformat": {
"cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Assign example</span></a>",
"hasname": "true"
},
"id": 4,
"module": "assign",
"extraclasses": ""
}
}
],
"hascms": true,
"showmovehere": true,
"movingstr": "Moving this activity: folder example",
"cancelcopyurl": "#",
"movetosectionurl": "#",
"strmovefull": "Move 'folder example' to this location"
}
}}
{{#showmovehere}}
<p>{{movingstr}} (<a href="{{{cancelcopyurl}}}">{{#str}} cancel {{/str}}</a>)</p>
{{/showmovehere}}
<ul class="section m-0 p-0 img-text {{#hascms}} d-block {{/hascms}}" data-for="cmlist">
{{#cms}}
{{#showmovehere}}
<li class="movehere">
<a href="{{{moveurl}}}" title="{{strmovefull}}" class="movehere"></a>
</li>
{{/showmovehere}}
{{#cmitem}}
{{$ core_courseformat/local/content/section/cmitem}}
{{> core_courseformat/local/content/section/cmitem}}
{{/ core_courseformat/local/content/section/cmitem}}
{{/cmitem}}
{{/cms}}
{{#showmovehere}}
<li class="movehere">
<a href="{{{movetosectionurl}}}" title="{{strmovefull}}" class="movehere"></a>
</li>
{{/showmovehere}}
</ul>
@@ -0,0 +1,48 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/section/cmsummary
Displays the activities summary of a section.
Example context (json):
{
"showcompletion": true,
"mods": [
{
"name": "Forums",
"count": "3"
},
{
"name": "Books",
"count": "2"
}
],
"modprogress": "Progress: 1 / 5",
"totalactivities": "5"
}
}}
<div class="section-summary-activities d-flex">
<div class="d-flex align-items-center">
{{#pix}}i/activities, moodle{{/pix}}{{#str}} totalactivities, course, {{totalactivities}} {{/str}}
</div>
{{#showcompletion}}
<div class="d-flex ml-auto align-items-center">
{{#pix}}i/stats, moodle{{/pix}}{{modprogress}}
</div>
{{/showcompletion}}
</div>
@@ -0,0 +1,182 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/section/content
The internal content of a section.
Example context (json):
{
"num": 3,
"id": 35,
"controlmenu": "[tools menu]",
"header": {
"name": "Section title",
"title": "<a href=\"http://moodle/course/view.php?id=5#section-0\">Section title</a>",
"url": "#",
"ishidden": true
},
"cmlist": {
"cms": [
{
"cmitem": {
"cmformat": {
"cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Forum example</span></a>",
"hasname": "true"
},
"id": 3,
"cmid": 3,
"module": "forum",
"anchor": "activity-3",
"extraclasses": "newmessages"
}
},
{
"cmitem": {
"cmformat": {
"cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Assign example</span></a>",
"hasname": "true"
},
"id": 4,
"cmid": 4,
"anchor": "activity-4",
"module": "assign",
"extraclasses": ""
}
}
],
"hascms": true
},
"ishidden": false,
"iscurrent": true,
"currentlink": "<span class=\"accesshide\">This topic</span>",
"availability": {
"info": "<span class=\"badge bg-info\">Hidden from students</span>",
"hasavailability": true
},
"summary": {
"summarytext": "Summary text!"
},
"controlmenu": {
"menu": "<a href=\"#\" class=\"d-inline-block dropdown-toggle icon-no-margin\">Edit<b class=\"caret\"></b></a>",
"hasmenu": true
},
"cmcontrols": "[Add an activity or resource]",
"iscoursedisplaymultipage": true,
"sectionreturnid": 0,
"contentcollapsed": false,
"insertafter": true,
"numsections": 42,
"sitehome": false,
"highlightedlabel" : "Highlighted"
}
}}
{{#singleheader}}
{{$ core_courseformat/local/content/section/header }}
{{> core_courseformat/local/content/section/header }}
{{/ core_courseformat/local/content/section/header }}
{{/singleheader}}
{{#header}}
{{$ core_courseformat/local/content/section/header }}
{{> core_courseformat/local/content/section/header }}
{{/ core_courseformat/local/content/section/header }}
{{/header}}
{{^singleheader}}
{{#restrictionlock}}
<div class="align-self-center ml-2">
{{#pix}}t/unlock, core{{/pix}}
</div>
{{/restrictionlock}}
{{/singleheader}}
<div data-region="sectionbadges" class="sectionbadges d-flex align-items-center">
{{$ core_courseformat/local/content/section/badges }}
{{> core_courseformat/local/content/section/badges }}
{{/ core_courseformat/local/content/section/badges }}
</div>
{{#collapsemenu}}
{{^displayonesection}}
<div class="flex-fill d-flex justify-content-end mr-2 align-self-start mt-2">
<a
id="collapsesections"
class="section-collapsemenu"
href="#"
aria-expanded="true"
role="button"
data-toggle="toggleall"
>
<span class="collapseall text-nowrap">{{#str}}collapseall{{/str}}</span>
<span class="expandall text-nowrap">{{#str}}expandall{{/str}}</span>
</a>
</div>
{{/displayonesection}}
{{/collapsemenu}}
{{#controlmenu}}
{{^displayonesection}}
{{$ core_courseformat/local/content/section/controlmenu }}
{{> core_courseformat/local/content/section/controlmenu }}
{{/ core_courseformat/local/content/section/controlmenu }}
{{/displayonesection}}
{{/controlmenu}}
{{#header}}
{{#headerdisplaymultipage}}
{{^displayonesection}}
{{^controlmenu}}
<div class="section_goto bulk-hidden ml-auto" data-sectionid="{{id}}">
<a href="{{{url}}}"
class="btn btn-icon d-flex align-items-center justify-content-center icon-no-margin"
title="{{#str}}gotosection, course, {{name}}{{/str}}">
<span class="dir-rtl-hide">
{{#pix}}t/right, moodle{{/pix}}
</span>
<span class="dir-ltr-hide">
{{#pix}}t/left, moodle, {{#str}}gotosection, course, {{name}}{{/str}}{{/pix}}
</span>
<span class="sr-only">
{{#str}}gotosection, course, {{name}}{{/str}}
</span>
</a>
</div>
{{/controlmenu}}
{{/displayonesection}}
{{/headerdisplaymultipage}}
{{/header}}
</div>
<div id="coursecontentcollapse{{num}}"
class="content {{^iscoursedisplaymultipage}}{{^sitehome}}{{^displayonesection}}course-content-item-content collapse {{^contentcollapsed}}show{{/contentcollapsed}}{{/displayonesection}}{{/sitehome}}{{/iscoursedisplaymultipage}}">
<div class="{{#hasavailability}}description{{/hasavailability}} my-3" data-for="sectioninfo">
{{#summary}}
{{$ core_courseformat/local/content/section/summary }}
{{> core_courseformat/local/content/section/summary }}
{{/ core_courseformat/local/content/section/summary }}
{{/summary}}
{{#availability}}
{{$ core_courseformat/local/content/section/availability }}
{{> core_courseformat/local/content/section/availability }}
{{/ core_courseformat/local/content/section/availability }}
{{/availability}}
</div>
{{#cmsummary}}
{{$ core_courseformat/local/content/section/cmsummary }}
{{> core_courseformat/local/content/section/cmsummary }}
{{/ core_courseformat/local/content/section/cmsummary }}
{{/cmsummary}}
{{#cmlist}}
{{$ core_courseformat/local/content/section/cmlist }}
{{> core_courseformat/local/content/section/cmlist }}
{{/ core_courseformat/local/content/section/cmlist }}
{{/cmlist}}
{{{cmcontrols}}}
@@ -0,0 +1,32 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/section/controlmenu
Displays a section control menu (dropdown menu).
Example context (json):
{
"menu": "<a href=\"#\" class=\"d-inline-block dropdown-toggle icon-no-margin\">Edit<b class=\"caret\"></b></a>",
"hasmenu": true
}
}}
{{#hasmenu}}
<div class="section_action_menu bulk-hidden ml-auto" data-sectionid="{{id}}">
{{{menu}}}
</div>
{{/hasmenu}}
@@ -0,0 +1,79 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/section/header
Displays a course section header.
Example context (json):
{
"id": 123,
"name": "Section title",
"title": "<a href=\"http://moodle/course/view.php?id=5#section-0\">Section title</a>",
"url": "#",
"headerdisplaymultipage": true,
"sectionbulk": true,
"editing": 0
}
}}
{{#sectionbulk}}
{{$ core_courseformat/local/content/section/bulkselect }}
{{> core_courseformat/local/content/section/bulkselect }}
{{/ core_courseformat/local/content/section/bulkselect }}
{{/sectionbulk}}
{{#headerdisplaymultipage}}
{{^displayonesection}}
<h3 id="sectionid-{{id}}-title" class="h4 sectionname">
{{{title}}}
</h3>
{{/displayonesection}}
{{/headerdisplaymultipage}}
{{^headerdisplaymultipage}}
{{#sitehome}}
<h2 id="sectionid-{{id}}-title" class="h3 sectionname">
{{{title}}}
</h2>
{{/sitehome}}
{{^sitehome}}
{{^displayonesection}}
<div class="d-flex align-items-start position-relative">
<a role="button"
data-toggle="collapse"
data-for="sectiontoggler"
href="#coursecontentcollapse{{num}}"
id="collapssesection{{num}}"
aria-expanded="{{^contentcollapsed}}true{{/contentcollapsed}}{{#contentcollapsed}}false{{/contentcollapsed}}"
aria-controls="coursecontentcollapse{{num}}"
class="btn btn-icon mr-3 icons-collapse-expand justify-content-center
{{#contentcollapsed}} collapsed {{/contentcollapsed}}"
aria-label="{{name}}">
<span class="expanded-icon icon-no-margin p-2" title="{{#str}} collapse, core {{/str}}">
{{#pix}} t/expandedchevron, core {{/pix}}
</span>
<span class="collapsed-icon icon-no-margin p-2" title="{{#str}} expand, core {{/str}}">
<span class="dir-rtl-hide">{{#pix}} t/collapsedchevron, core {{/pix}}</span>
<span class="dir-ltr-hide">{{#pix}} t/collapsedchevron_rtl, core {{/pix}}</span>
</span>
</a>
<h3 class="h4 sectionname course-content-item d-flex align-self-stretch align-items-center mb-0"
id="sectionid-{{id}}-title" data-for="section_title" data-id="{{id}}" data-number="{{num}}">
{{{title}}}
</h3>
</div>
{{/displayonesection}}
{{/sitehome}}
{{/headerdisplaymultipage}}
@@ -0,0 +1,31 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/section/summary
Displays the course section summary.
Example context (json):
{
"summarytext": "Summary text!"
}
}}
{{#summarytext}}
<div class="summarytext">
{{{summarytext}}}
</div>
{{/summarytext}}
@@ -0,0 +1,85 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/section/visibility
Template to displays if an section is in hidden or not.
Example context (json):
{
"editing": "1",
"notavailable": 1,
"hiddenfromstudents": 0,
"dropwdown": {
"buttonid": "dropwdownbutton_648b1549b929e30",
"buttoncontent": "Show on course page",
"choices": {
"description": null,
"options": [
{
"value": "show",
"name": "Show on course page",
"description": "Available to students.",
"url": null,
"icon": null,
"disabled": false,
"hasicon": false,
"hasurl": false,
"selected": true,
"optionnumber": 1,
"first": true,
"optionuniqid": "choice_option_648b1549b929e31"
},
{
"value": "hide",
"name": "Hide on course page",
"description": "Not available to students.",
"url": null,
"icon": null,
"disabled": false,
"hasicon": false,
"hasurl": false,
"optionnumber": 2,
"first": false,
"optionuniqid": "choice_option_648b1549b929e32"
}
],
"hasoptions": true
}
}
}
}}
{{#editing}}
<div class="order-2" data-region="visibility">
{{#dropwdown}}
{{< core/local/dropdown/status}}
{{$ buttonclasses }} badge rounded-pill bg-secondary text-dark dropdown-toggle border-0{{/ buttonclasses }}
{{/ core/local/dropdown/status}}
{{/dropwdown}}
</div>
<span class="badge rounded-pill bg-secondary text-dark order-3 {{^notavailable}}d-none{{/notavailable}}">
{{#str}}notavailable{{/str}}
</span>
{{/editing}}
{{^editing}}
{{#hiddenfromstudents}}
<span class="badge rounded-pill bg-secondary text-dark order-2">{{#pix}}i/show, core{{/pix}}{{#str}}hiddenfromstudents{{/str}}</span>
{{/hiddenfromstudents}}
{{#notavailable}}
<span class="badge rounded-pill bg-secondary text-dark order-3">{{#str}}notavailable{{/str}}</span>
{{/notavailable}}
{{/editing}}
@@ -0,0 +1,49 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/sectionnavigation
Displays the course section navigation.
Example context (json):
{
"hasprevious": true,
"previousurl": "#",
"larrow": "&#x25C4;",
"previousname": "Section 3",
"hasnext": true,
"rarrow": "&#x25BA;",
"nexturl": "#",
"nextname": "Section 5"
}
}}
<div class="section-navigation navigationtitle d-flex justify-content-between">
<div class="prevsection">
{{#hasprevious}}
<a href="{{{previousurl}}}" class="{{#previoushidden}} dimmed_text {{/previoushidden}}">
<span class="larrow">{{{larrow}}}</span>{{{previousname}}}
</a>
{{/hasprevious}}
</div>
<div class="nextsection">
{{#hasnext}}
<a href="{{{nexturl}}}" class="{{#nexthidden}} dimmed_text {{/nexthidden}}">
<span class="rarrow">{{{rarrow}}}</span>{{{nextname}}}
</a>
{{/hasnext}}
</div>
</div>
@@ -0,0 +1,53 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/content/sectionselector
Displays the course section navigation.
Example context (json):
{
"hasprevious": true,
"previousurl": "#",
"larrow": "&#x25C4;",
"previousname": "Section 3",
"hasnext": true,
"rarrow": "&#x25BA;",
"nexturl": "#",
"nextname": "Section 5",
"selector": "<select><option>Section 4</option></select>"
}
}}
<div class="section-navigation mdl-bottom d-flex justify-content-between">
<div class="prevsection">
{{#hasprevious}}
<a href="{{{previousurl}}}" class="{{#previoushidden}} dimmed_text {{/previoushidden}}">
<span class="larrow">{{{larrow}}}</span>{{{previousname}}}
</a>
{{/hasprevious}}
</div>
<div>
{{{selector}}}
</div>
<div class="nextsection">
{{#hasnext}}
<a href="{{{nexturl}}}" class="{{#nexthidden}} dimmed_text {{/nexthidden}}">
<span class="rarrow">{{{rarrow}}}</span>{{{nextname}}}
</a>
{{/hasnext}}
</div>
</div>
@@ -0,0 +1,71 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/courseindex/cm
Displays a course index course-module entry.
Example context (json):
{
"id": "12",
"name": "Announcements",
"url": "#",
"visible": 1,
"isactive": 1,
"uniqid": "0",
"accessvisible": 1,
"hascmrestrictions": 0,
"indent": 1
}
}}
<li class="courseindex-item
{{#isactive}}active{{/isactive}}
{{#hascmrestrictions}}restrictions{{/hascmrestrictions}}
{{^accessvisible}}dimmed{{/accessvisible}}
d-flex
{{#indent}} indented {{/indent}}"
id="course-index-cm-{{id}}"
data-for="cm"
data-id="{{id}}"
role="treeitem"
>
<span class="completioninfo" data-for="cm_completion" data-value="NaN"></span>
{{#uservisible}}
<a
class="courseindex-link text-truncate"
{{#url}} href="{{{url}}}" {{/url}}{{^url}} href="#{{{anchor}}}" data-anchor="true" {{/url}}
data-for="cm_name"
tabindex="-1"
>
{{{name}}}
</a>
{{/uservisible}}
{{^uservisible}}
<a class="courseindex-link text-truncate" href="#{{{anchor}}}" data-for="cm_name" tabindex="-1" data-anchor="true">
{{{name}}}
</a>
{{/uservisible}}
<span class="courseindex-locked ml-1" data-for="cm_name">
{{#pix}} t/locked, core {{/pix}}
</span>
<span class="dragicon ml-auto">{{#pix}}i/dragdrop{{/pix}}</span>
</li>
{{#js}}
require(['core_courseformat/local/courseindex/cm'], function(component) {
component.init('course-index-cm-{{id}}');
});
{{/js}}
@@ -0,0 +1,48 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/courseindex/cmcompletion
Displays a course index course-module entry.
Example context (json):
{
"state": 1,
"iscomplete": true,
"isincomplete": true,
"isfail": true,
"hasstate": true
}
}}
{{#iscomplete}}
<span class="completioninfo completion_complete" data-for="cm_completion" data-value="{{state}}">
{{#pix}} t/completion_complete, moodle, {{#str}} done, completion {{/str}} {{/pix}}
</span>
{{/iscomplete}}
{{#isincomplete}}
<span class="completioninfo completion_incomplete" data-for="cm_completion" data-value="{{state}}">
{{#pix}} t/completion_incomplete, moodle, {{#str}} todo, completion {{/str}} {{/pix}}
</span>
{{/isincomplete}}
{{#isfail}}
<span class="completioninfo completion_fail" data-for="cm_completion" data-value="{{state}}">
{{#pix}} t/completion_fail, moodle, {{#str}} failed, completion {{/str}} {{/pix}}
</span>
{{/isfail}}
{{^hasstate}}
<span class="completioninfo completion_none" data-for="cm_completion" data-value="{{state}}"></span>
{{/hasstate}}
@@ -0,0 +1,111 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/courseindex/courseindex
Displays the course index.
Example context (json):
{
"editmode": true,
"sections": [
{
"title": "General",
"id": 42,
"number": 1,
"sectionurl": "#",
"indexcollapsed": 0,
"cms": [
{
"name": "Glossary of characters",
"id": "10",
"url": "#",
"visible": 1,
"isactive": 0,
"uniqid": "0",
"accessvisible": 1
},
{
"name": "World Cinema forum",
"id": "11",
"url": "#",
"visible": 1,
"isactive": 0,
"uniqid": "0",
"accessvisible": 1
},
{
"name": "Announcements",
"id": "12",
"url": "#",
"visible": 1,
"isactive": 1,
"uniqid": "0",
"accessvisible": 1
}
]
},
{
"title": "City of God or Cidade de Deus",
"id": "43",
"number": "2",
"sectionurl": "#",
"indexcollapsed": 1,
"cms": [
{
"name": "Resources",
"id": "13",
"url": "#",
"visible": 1,
"isactive": 0,
"uniqid": "0",
"accessvisible": 1
},
{
"name": "Studying City of God by Stephen Smith Bergman-Messerschmidt",
"id": "14",
"url": "#",
"visible": 1,
"isactive": 0,
"uniqid": "0",
"accessvisible": 1
},
{
"name": "Film education study guide",
"id": "15",
"url": "#",
"visible": 1,
"isactive": 0,
"uniqid": "0",
"accessvisible": 1
}
]
}
]
}
}}
<div id="course-index" class="courseindex {{#editmode}} editing {{/editmode}}" role="tree">
{{#sections}}
{{> core_courseformat/local/courseindex/section }}
{{/sections}}
</div>
{{#js}}
require(['core_courseformat/local/courseindex/courseindex'], function(component) {
component.init('course-index');
});
{{/js}}
@@ -0,0 +1,37 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/courseindex/drawer
This template renders the course index drawer with the placeholder.
The code from this file is just an stub as the final code will come from
the new layouts for Moodle 4.0.
Example context (json):
{}
}}
<nav id="courseindex" class="courseindex">
<div id="courseindex-content">
{{> core_courseformat/local/courseindex/placeholders }}
</div>
</nav>
{{#js}}
require(['core_courseformat/local/courseindex/drawer'], function(component) {
component.init('courseindex');
});
{{/js}}
@@ -0,0 +1,57 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/courseindex/placeholders
This template renders the loading placeholders for the course index.
Example context (json):
{}
}}
<div data-region="loading-placeholder-content" aria-hidden="true" id="course-index-placeholder">
<ul class="placeholders list-unstyled px-5">
<li>
<div class="col-md-6 p-0 d-flex align-items-center">
<div class="bg-pulse-grey rounded-circle mr-2"></div>
<div class="bg-pulse-grey w-100"></div>
</div>
</li>
<li>
<div class="col-md-6 p-0 d-flex align-items-center">
<div class="bg-pulse-grey rounded-circle mr-2"></div>
<div class="bg-pulse-grey w-100"></div>
</div>
</li>
<li>
<div class="col-md-6 p-0 d-flex align-items-center">
<div class="bg-pulse-grey rounded-circle mr-2"></div>
<div class="bg-pulse-grey w-100"></div>
</div>
</li>
<li>
<div class="col-md-6 p-0 d-flex align-items-center">
<div class="bg-pulse-grey rounded-circle mr-2"></div>
<div class="bg-pulse-grey w-100"></div>
</div>
</li>
</ul>
</div>
{{#js}}
require(['core_courseformat/local/courseindex/placeholder'], function(component) {
component.init('course-index-placeholder');
});
{{/js}}
@@ -0,0 +1,124 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_courseformat/local/courseindex/section
Displays a course index section entry.
Example context (json):
{
"title": "General",
"id": 23,
"uniqid": "0",
"number": 1,
"sectionurl": "#",
"indexcollapsed": 0,
"current": 1,
"visible": 1,
"hasrestrictions": 0,
"cms": [
{
"id": 10,
"name": "Glossary of characters",
"url": "#",
"visible": 1,
"isactive": 0
},
{
"id": 11,
"name": "World Cinema forum",
"url": "#",
"visible": 1,
"isactive": 0
},
{
"id": 12,
"name": "Announcements",
"url": "#",
"visible": 0,
"isactive": 1
}
]
}
}}
<div
class="courseindex-section {{#current}}current{{/current}}"
id="course-index-section-{{id}}"
data-for="section"
data-id="{{id}}"
data-number="{{number}}"
role="treeitem"
aria-owns="courseindexcollapse{{number}}"
>
<div class="courseindex-item d-flex
{{^visible}}dimmed{{/visible}}
{{#hasrestrictions}}restrictions{{/hasrestrictions}}
courseindex-section-title"
id="courseindexsection{{number}}"
data-for="section_item"
>
<a data-toggle="collapse"
href="#courseindexcollapse{{number}}"
class="courseindex-chevron icons-collapse-expand {{#indexcollapsed}}collapsed{{/indexcollapsed}}"
aria-expanded="{{^indexcollapsed}}true{{/indexcollapsed}}{{#indexcollapsed}}false{{/indexcollapsed}}"
aria-controls="courseindexcollapse{{number}}"
tabindex="-1"
>
<span class="collapsed-icon icon-no-margin mr-1"
title="{{#str}} expand, core {{/str}}">
<span class="dir-rtl-hide">{{#pix}} t/collapsedchevron, core {{/pix}}</span>
<span class="dir-ltr-hide">{{#pix}} t/collapsedchevron_rtl, core {{/pix}}</span>
<span class="sr-only">{{#str}} expand, core {{/str}}</span>
</span>
<span class="expanded-icon icon-no-margin mr-1"
title="{{#str}} collapse, core {{/str}}">
{{#pix}} t/expandedchevron, core {{/pix}}
<span class="sr-only">{{#str}} collapse, core {{/str}}</span>
</span>
</a>
<a href="{{{sectionurl}}}"
class="courseindex-link text-truncate"
data-action="togglecourseindexsection"
data-for="section_title"
tabindex="-1"
>
{{{title}}}
</a>
<span class="current-badge badge bg-primary text-white ml-2 px-2 rounded-pill">
{{highlighted}}
</span>
<span class="courseindex-locked ml-1" data-for="cm_name">
{{#pix}} t/locked, core {{/pix}}
</span>
<span class="dragicon ml-auto">{{#pix}}i/dragdrop{{/pix}}</span>
</div>
<div id="courseindexcollapse{{number}}"
class="courseindex-item-content collapse {{^indexcollapsed}}show{{/indexcollapsed}}"
aria-labelledby="courseindexsection{{number}}" role="group"
>
<ul class="courseindex-sectioncontent unlist" data-for="cmlist" data-id="{{id}}" role="group">
{{#cms}}
{{> core_courseformat/local/courseindex/cm }}
{{/cms}}
</ul>
</div>
</div>
{{#js}}
require(['core_courseformat/local/courseindex/section'], function(component) {
component.init('course-index-section-{{id}}');
});
{{/js}}