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
+62
View File
@@ -0,0 +1,62 @@
{{!
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/action_link
Action link template.
Context variables required for this template:
* disabled - Flag that indicates whether the action link to be rendered is disabled or not.
* url - The action link URL.
* id - The ID.
* classes - CSS classes for the action link.
* attributes - Array of attributes.
* name - Attribute name.
* value - Attribute value.
* icon - The icon context data for this action link.
* text - The text for this action link.
Example context (json):
{
"disabled": false,
"url": "#",
"id": "test-id",
"classes": "btn btn-link",
"attributes": [
{
"name": "title",
"value": "Action link's title"
}
],
"icon": {
"attributes": [
{"name": "src", "value": "https://raw.githubusercontent.com/moodle/moodle/master/pix/t/check.png"},
{"name": "alt", "value": "Action link's icon"}
]
},
"text": "This is an action link"
}
}}
{{^disabled}}
<a href="{{{url}}}" id="{{id}}" class="{{classes}}" {{#attributes}} {{name}}="{{value}}" {{/attributes}}>{{#icon}}{{#pix}}{{key}}, {{component}}, {{title}}{{/pix}}{{/icon}}{{{text}}}</a>
{{#hasactions}}
{{> core/actions }}
{{/hasactions}}
{{/disabled}}
{{#disabled}}
<span class="currentlink {{classes}}" {{#attributes}} {{name}}="{{value}}" {{/attributes}}>{{#icon}}{{#pix}}{{key}}, {{component}}, {{title}}{{/pix}}{{/icon}}{{text}}</span>
{{/disabled}}
+63
View File
@@ -0,0 +1,63 @@
{{!
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/action_menu
Action menu.
Example context (json):
{
"classes": "",
"instance": "1",
"primary": {
"items": [{"rawhtml": "<p>Item in primary menu</p>"}]
},
"secondary": {
"attributes": [
{"name": "id", "value": "action-menu-1-menu"}
],
"items": [
{
"rawhtml": "<p>Item in secondary menu</p>"
}
]
}
}
}}
<div class="action-menu {{classes}}"{{#attributes}} {{name}}="{{value}}"{{/attributes}}>
{{#primary}}
<div class="{{classes}} d-flex "{{#attributes}} {{name}}="{{value}}"{{/attributes}}>
{{#prioritise}}{{> core/action_menu_trigger }}{{/prioritise}}
{{#items}}
<div class="action-menu-item">
{{> core/action_menu_item }}
</div>
{{/items}}
{{^prioritise}}
<div class="action-menu-trigger">
{{> core/action_menu_trigger }}
</div>
{{/prioritise}}
</div>
{{/primary}}
</div>
+31
View File
@@ -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/action_menu_item
Action menu item.
Example context (json):
{
"rawhtml": "<p>[rawhtml]</p>"
}
}}
{{#actionmenulink}}{{> core/action_menu_link }}{{/actionmenulink}}
{{#actionmenufiller}}<span class="filler">&nbsp;</span>{{/actionmenufiller}}
{{#actionlink}}{{> core/action_link }}{{/actionlink}}
{{#pixicon}}{{#pix}}{{key}}, {{component}}, {{title}}{{/pix}}{{/pixicon}}
{{#rawhtml}}{{{.}}}{{/rawhtml}}
+41
View File
@@ -0,0 +1,41 @@
{{!
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/action_menu_link
Action menu link.
Example context (json):
{
"text": "Example link text",
"showtext": true,
"url": "http://example.com/link"
}
}}
{{^disabled}}
<a href="{{url}}" class="{{$actionmenulinkclasses}}aabtn {{classes}}{{/actionmenulinkclasses}}" {{#attributes}}{{name}}="{{value}}" {{/attributes}}>
{{#icon}}
{{#pix}}{{key}}, {{component}}, {{title}}{{/pix}}
{{/icon}}
{{#showtext}}
<span class="menu-action-text">{{{text}}}</span>
{{/showtext}}
</a>
{{/disabled}}
{{#disabled}}
<span class="currentlink" role="menuitem">{{#icon}}{{#pix}}{{key}},{{component}},{{title}}{{/pix}}{{/icon}}{{{text}}}</span>
{{/disabled}}
+133
View File
@@ -0,0 +1,133 @@
{{!
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/action_menu_trigger
Action menu trigger.
Example context (json):
{
"actiontext": "Example link text",
"title": "Example link title",
"triggerrole": "button",
"triggerattributes": [
{"name": "data-boundary", "value": "window" }
],
"url": "http://example.com/link",
"classes": "icon menu-action",
"instance": "1",
"triggerextraclasses": "",
"attributes": [
{"name": "role", "value": "menuitem" },
{"name": "data-title", "value": "mymoodle,admin" }
],
"secondary": {
"classes": "menu align-tr-br",
"dropdownalignment": "dropdown-menu-right",
"attributes": [
{"name": "id", "value": "action-menu-0-menu"},
{"name": "data-rel", "value": "menu-content"},
{"name": "role", "value": "menu"},
{"name": "data-align", "value": "tr-br"}
],
"items": [
{"actionmenulink":
{
"id": "action_link59ecf8394a68078",
"disabled": false,
"text": "Dashboard",
"url": "http://example.com/link",
"icon": {
"key": "i/dashboard",
"component": null,
"title": "Dashboard"
},
"classes": "menu-action",
"attributes": [
{"name": "role", "value": "menuitem"},
{"name": "data-title", "value": "mymoodle,admin"}
],
"instance": 1,
"showtext": true
}
},
{"actionmenufiller":
{
"id": "action_link59ecf8394a68079",
"disabled": false,
"text": "",
"url": "",
"icon": null,
"classes": "",
"attributes": [
{"name": "role", "value": "menuitem"}
]
}
}
]
}
}
}}
<div class="dropdown{{^secondary.items}} hidden{{/secondary.items}}">
<a
href="#"
tabindex="0"
class="{{triggerextraclasses}} dropdown-toggle icon-no-margin"
id="action-menu-toggle-{{instance}}"
aria-label="{{title}}"
data-toggle="dropdown"
role="{{triggerrole}}"
aria-haspopup="true"
aria-expanded="false"
aria-controls="action-menu-{{instance}}-menu"
{{#triggerattributes}}
{{name}}="{{value}}"
{{/triggerattributes}}
>
{{{actiontext}}}
{{{menutrigger}}}
{{#icon}}
{{#pix}}
{{key}},{{component}},{{title}}
{{/pix}}
{{/icon}}
{{#rawicon}}{{{.}}}{{/rawicon}}
{{#menutrigger}}
<b class="caret"></b>
{{/menutrigger}}
</a>
{{#secondary}}
<div class="dropdown-menu {{classes}} {{dropdownalignment}}"{{#attributes}} {{name}}="{{value}}"{{/attributes}}>
{{#items}}
{{#actionmenulink}}
{{< core/action_menu_link}}
{{$actionmenulinkclasses}}dropdown-item {{classes}}{{/actionmenulinkclasses}}
{{/ core/action_menu_link}}
{{/actionmenulink}}
{{#actionmenufiller}}
<div class="dropdown-divider" role="presentation"><span class="filler">&nbsp;</span></div>
{{/actionmenufiller}}
{{#subpanel}}
{{> core/local/action_menu/subpanel}}
{{/subpanel}}
{{#simpleitem}}
<div class="dropdown-item">{{> core/action_menu_item }}</div>
{{/simpleitem}}
{{/items}}
</div>
{{/secondary}}
</div>
+33
View File
@@ -0,0 +1,33 @@
{{!
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/actions
Actions.
Example context (json):
{
"actions": [{"event": "event", "jsfunction": "Y.log", "id": "id"}]
}
}}
{{#js}}
require(['core/yui'], function(Y) {
{{#actions}}
Y.on('{{event}}', {{{jsfunction}}}, '#{{id}}', null{{#jsfunctionargs}}, {{{jsfunctionargs}}}{{/jsfunctionargs}});
{{/actions}}
});
{{/js}}
+88
View File
@@ -0,0 +1,88 @@
{{!
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/activity_header
Activity header template.
Context variables required for this template:
* title - The title of the activity module
* description - The intro for the module
* completion - The completion info if available for the the module as acquired via the activity_information method
* additional_items - Any additional URL select navigation that needs to show up in the header
Example context (json):
{
"title": "Assignment 1",
"description": "The assignment does something",
"completion": "<div class='activitycompletion'>Some activity completion criteria</div>",
"additional_items": {
"id": "url_select_test",
"action": "https://example.com/post",
"formid": "url_select_form",
"sesskey": "sesskey",
"label": "core/url_select",
"helpicon": {
"title": "Help with something",
"text": "Help with something",
"url": "http://example.org/help",
"linktext": "",
"icon":{
"extraclasses": "iconhelp",
"attributes": [
{"name": "src", "value": "../../../pix/help.svg"},
{"name": "alt", "value": "Help icon"}
]
}
},
"showbutton": "Go",
"options": [{
"name": "Group 1", "isgroup": true, "options":
[
{"name": "Item 1", "isgroup": false, "value": "1"},
{"name": "Item 2", "isgroup": false, "value": "2"}
]},
{"name": "Group 2", "isgroup": true, "options":
[
{"name": "Item 3", "isgroup": false, "value": "3"},
{"name": "Item 4", "isgroup": false, "value": "4"}
]}],
"disabled": false,
"title": "Some cool title"
}
}
}}
<span id="maincontent"></span>
{{#title}}
<h2>{{{title}}}</h2>
{{/title}}
<div class="activity-header" data-for="page-activity-header">{{!
}}{{#completion}}
<span class="sr-only">{{#str}} overallaggregation, completion {{/str}}</span>
{{{completion}}}
{{/completion}}
{{#description}}
<div class="activity-description" id="intro">
{{{description}}}
</div>
{{/description}}{{!
}}</div>
{{#additional_items}}
<nav aria-label="{{#str}} additionalcustomnav, core {{/str}}">
{{> core/url_select}}
</nav>
{{/additional_items}}
+48
View File
@@ -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/add_block_body
Template for the body of the add block modal.
Context variables required for this template:
* blocks - list of blocks containing name and title
* url - base url for links back to same page.
Example context (json):
{
"blocks" : [
{ "name": "test", "title": "Test block" },
{ "name": "html", "title": "Block with form", "blockform": "block_edit_form" }
],
"url" : "?a=b"
}
}}
<div class="list-group">
{{#blocks}}
<a href="{{url}}&amp;bui_addblock={{name}}" class="list-group-item list-group-item-action"
data-blockname="{{name}}" data-blocktitle="{{title}}" data-blockregion="{{blockregion}}"
{{#blockform}}data-action="showaddblockform" data-blockform="{{blockform}}"{{/blockform}}
>{{#blockform}}{{#str}}textellipsis, moodle, {{title}}{{/str}}{{/blockform}}{{^blockform}}{{title}}{{/blockform}}</a>
{{/blocks}}
{{^blocks}}
<div class="alert alert-primary" role="alert">
{{#str}} noblockstoaddhere {{/str}}
</div>
{{/blocks}}
</div>
+43
View File
@@ -0,0 +1,43 @@
{{!
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/add_block_button
Template for the body of the fake 'add block' block.
Example context (json):
{
"link" : "/my/index.php?bui_addblock&bui_blockregion=content&sesskey=M3mes",
"escapedlink" : "?bui_addblock&bui_blockregion=content&sesskey=M3mes",
"pagehash": "abcdefgh",
"blockregion": "side-pre"
}
}}
<div class="add_block_button">
<a href="{{link}}" id="addblock-{{uniqid}}" class="btn btn-link block-add text-left mb-3" data-key="addblock"
data-url="{{escapedlink}}" data-blockregion="{{blockregion}}">
<i class="fa fa-plus py-2 mr-3" aria-hidden="true"></i>{{#str}}addblock{{/str}}
</a>
</div>
{{#js}}
// Initialise the JS for the modal window which displays the blocks available to add.
require(['core_block/add_modal'], function(addBlockModal) {
addBlockModal.init(null, '{{pagehash}}');
});
{{/js}}
@@ -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/async_backup_progress.
Moodle Asynchronous backup status template.
The purpose of this template is to render status
updates during an asynchronous backup or restore
process..
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
*
Example context (json):
{
"backupid": "f04abf8cba0319e486a3dfa7e9cb4476",
"restoreid": "f04abf8cba0319e486a3dfa7e9cb4477",
"operation": "backup",
"width": "500"
}
}}
<div class="progress active" style="height: 25px; width: {{#width}}{{width}}{{/width}}{{^width}}500{{/width}}px;">
<div id="{{backupid}}_bar"
class="progress-bar progress-bar-striped progress-bar-animated"
style="width: 100%"
role="progressbar"
aria-valuemin="0"
aria-valuemax="100"
aria-valuenow="0"
{{#operation}}data-operation="{{operation}}"{{/operation}}
{{#backupid}}data-backupid="{{backupid}}"{{/backupid}}
{{#restoreid}}data-restoreid="{{restoreid}}"{{/restoreid}}>
{{# str }} asyncprocesspending, backup {{/ str }}
</div>
</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/async_backup_progress_row.
Moodle Asynchronous backup status table row template.
The purpose of this template is to render status
table row updates during an asynchronous backup process.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
*
Example context (json):
{
"filename": "backup-moodle2-course-49390-test_course-20190326-1546-nu-nf.mbz",
"time": "Tuesday, 26 March 2019, 3:47 PM",
"size": "7.2KB",
"fileurl": "https://moodle.local/pluginfile.php/7945628/backup/course/backup-moodle2-course-49390-test_course-20190326-1546-nu-nf.mbz?forcedownload=1",
"restoreurl": "https://moodle.local/backup/restorefile.php?action=choosebackupfile&filename=backup-moodle2-course-49390-test_course-20190326-1546-nu-nf.mbz&filepath=%2F&component=backup&filearea=course&filecontextid=7945628&contextid=7945628&itemid=0"
}
}}
<td class="cell c0" style="">{{filename}}</td>
<td class="cell c1" style="">{{time}}</td>
<td class="cell c2" style="">{{size}}</td>
<td class="cell c3" style=""><a href="{{fileurl}}">{{# str }} download, core {{/ str }}</a></td>
<td class="cell c4" style=""><a href="{{restoreurl}}">{{# str }} restore, core {{/ str }}</a></td>
<td class="cell c5 lastcol" style="">
<span class="action-icon">
<i class="icon fa fa-check fa-fw " title="{{# str }} successful, backup {{/ str }}" aria-label="{{# str }} successful, backup {{/ str }}"></i>
</span>
</td>
@@ -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/async_backup_status.
Moodle Asynchronous backup status template.
The purpose of this template is to render status
updates during an asynchronous backup or restore
process..
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
*
Example context (json):
{
"backupid": "f04abf8cba0319e486a3dfa7e9cb4476",
"contextid": "4",
"courseurl": "/course/view.php?id=6",
"restoreurl": "/backup/restorefile.php?contextid=287",
"headingident": "backup",
"width": "500"
}
}}
<div class="progressbar_container" id="{{backupid}}">
{{#headingident}}<h3 id="{{backupid}}_status">{{# str }} asyncbackuppending, backup {{/ str }}</h3>{{/headingident}}
{{^headingident}}<h3 id="{{backupid}}_status">{{# str }} asyncrestorepending, backup {{/ str }}</h3>{{/headingident}}
{{> core/async_backup_progress }}
<p id="{{backupid}}_detail">{{# str }} asyncnowait, backup {{/ str }}<br/>{{# str }} asynccheckprogress, backup, {{restoreurl}} {{/ str }}</p>
<a id="{{backupid}}_button" href="{{courseurl}}" class="btn btn-primary">{{# str }} asyncreturn, backup {{/ str }}</a>
</div>
{{#js}}
require(['core_backup/async_backup'], function(Async) {
Async.asyncBackupStatus("{{backupid}}", "{{contextid}}", "{{restoreurl}}", "{{headingident}}");
});
{{/js}}
@@ -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/async_restore_progress_row.
Moodle Asynchronous restore status table row template.
The purpose of this template is to render status
table row updates during an asynchronous restore process.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
*
Example context (json):
{}
}}
<span class="action-icon">
<i class="icon fa fa-check fa-fw " title="{{# str }} successfulcopy, backup {{/ str }}" aria-label="{{# str }} successfulcopy, backup {{/ str }}"></i>
</span>
@@ -0,0 +1,51 @@
{{!
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/async_restore_progress_row.
Moodle Asynchronous restore status table row template.
The purpose of this template is to render status
table row updates during an asynchronous restore process.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
*
Example context (json):
{
"resourcename" : "Mathematics 101",
"time": "Tuesday, 26 March 2019, 3:47 PM",
"restoreurl": "https://moodle.local/backup/restorefile.php?action=choosebackupfile&filename=backup-moodle2-course-49390-test_course-20190326-1546-nu-nf.mbz&filepath=%2F&component=backup&filearea=course&filecontextid=7945628&contextid=7945628&itemid=0"
}
}}
<td class="cell c0" style="">
<a href="{{restoreurl}}">{{resourcename}}</a>
</td>
<td class="cell c1" style="">{{time}}</td>
<td class="cell c2 lastcol" style="">
<span class="action-icon">
<i class="icon fa fa-check fa-fw " title="{{# str }} successfulrestore, backup {{/ str }}" aria-label="{{# str }} successfulrestore, backup {{/ str }}"></i>
</span>
</td>
@@ -0,0 +1,40 @@
{{!
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/auth_digital_minor_page
Example context (json):
{
"logourl": "https://moodle.org/logo/moodle-logo.svg",
"sitename": "Site name",
"supportname": "John Doe",
"supportemail": "johndoe@example.com",
"homelink": "/"
}
}}
<div class="card-title">
<h3>{{#str}}considereddigitalminor{{/str}}</h3>
</div>
<div class="pt-3 pb-5">
<p>{{#str}}digitalminor_desc{{/str}}</p>
<p class="mb-0">{{{supportname}}}</p>
<p class="mb-0">{{{supportemail}}}</p>
</div>
<div class="backlink">
<a href="{{homelink}}">{{#str}}backtohome{{/str}}</a>
</div>
@@ -0,0 +1,47 @@
{{!
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/auth_verify_age_location_page
Example context (json):
{
"logourl": "https://moodle.org/logo/moodle-logo.svg",
"sitename": "Site name",
"error": "Error message",
"formhtml": "(Form html would go here)"
}
}}
<div class="verifyage">
{{#error}}
<div class="alert alert-danger" role="alert" data-aria-autofocus="true">
{{{error}}}
</div>
{{/error}}
<div class="card-title">
<h3>{{#str}}agelocationverification{{/str}}</h3>
</div>
<div class="mt-2 mb-2">
{{{formhtml}}}
</div>
<hr>
<div class="card-title">
<h3>{{#str}}whyisthisrequired{{/str}}</h3>
</div>
<div class="mt-1">
<p >{{#str}}explanationdigitalminor{{/str}}</p>
</div>
</div>
@@ -0,0 +1,50 @@
{{!
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/aws/setting_aws_region
Admin aws region setting template.
Context variables required for this template:
* list - form list name
* name - form element name
* id - element id
* value - element value
* size - element size
* options - list of data list options: label, value.
Example context (json):
{
"list": "test",
"name": "test",
"id": "test0",
"value": "A tall, dark stranger will have more fun than you.",
"size": "21",
"options": [ { "label": "eu-north-1 - Europe (Stockholm)", "value": "eu-north-1" } ]
}
}}
{{!
Setting config aws region
}}
<div class="form-text defaultsnext">
<input type="text" list="{{list}}" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
<datalist id="{{list}}">
{{#options}}
<option value="{{value}}" label="{{label}}"></option>
{{/options}}
</datalist>
</div>
+65
View File
@@ -0,0 +1,65 @@
{{!
@template core/block
Example context (json):
{
"id": "block0",
"class": "block block_html",
"showskiplink": true,
"type": "html",
"ariarole": "complementary",
"title": "Test block",
"blockinstanceid": 1,
"content": "<p>Hello block world!</p>"
}
}}
{{! Block Skip Link }}
{{#showskiplink}}
<a href="#sb-{{skipid}}" class="sr-only sr-only-focusable">{{#str}}skipa, access, {{{title}}}{{/str}}</a>
{{/showskiplink}}
{{! Start Block Container }}
<section id="{{id}}"
class="{{#hidden}}hidden{{/hidden}} {{class}} {{#hascontrols}}block_with_controls{{/hascontrols}} card mb-3"
role="{{ariarole}}"
data-block="{{type}}"
data-instance-id="{{blockinstanceid}}"
{{#arialabel}}
aria-label="{{arialabel}}"
{{/arialabel}}
{{^arialabel}}
{{#title}}
aria-labelledby="instance-{{blockinstanceid}}-header"
{{/title}}
{{/arialabel}}>
{{! Block contents }}
<div class="card-body p-3">
{{! Block header }}
{{#title}}
<h3 id="instance-{{blockinstanceid}}-header" class="h5 card-title d-inline">{{{title}}}</h3>
{{/title}}
{{#hascontrols}}
<div class="block-controls float-right header">
{{{controls}}}
</div>
{{/hascontrols}}
<div class="card-text content mt-3">
{{{content}}}
<div class="footer">{{{footer}}}</div>
{{{annotation}}}
</div>
</div>
{{! End Block Container }}
</section>
{{! Block Skip Link Target }}
{{#showskiplink}}
<span id="sb-{{skipid}}"></span>
{{/showskiplink}}
@@ -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/bulkactions/bulk_action_trigger
Renders a trigger element for a given bulk action.
Context variables required for this template:
* none
Example context (json):
{
}
}}
<button
type="button"
class="btn py-0 d-flex flex-column"
data-action="{{$action}}{{/action}}"
title="{{$title}}{{/title}}"
>
<span class="w-100 pl-2">{{$icon}}{{/icon}}</span>
<span>{{$title}}{{/title}}</span>
</button>
@@ -0,0 +1,63 @@
{{!
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/bulkactions/bulk_actions
Renders a section with all available bulk actions.
Context variables required for this template:
* actions - Array of objects with the following properties:
* actiontrigger - The HTML for the action trigger.
Example context (json):
{
"actions": [
{
"actiontrigger": "<button>Move</button>"
}
]
}
}}
<div class="justify-content-between px-3 py-2" data-type="bulkactions">
<div class="d-flex">
</div>
<div data-for="bulktools">
<ul class="actions nav" data-for="bulkactions">
{{#actions}}
<li class="nav-item">
{{{actiontrigger}}}
</li>
{{/actions}}
</ul>
</div>
<div class="d-flex flex-column">
<div class="ml-auto">
<button
type="button"
class="btn pr-0 pb-0"
data-action="bulkcancel"
data-for="bulkcancel"
title="{{#str}} bulkcancel, core {{/str}}"
>
{{#pix}} e/cancel, core {{/pix}}
</button>
</div>
<div data-for="bulkcount">
{{#str}} bulkselection, core, {{bulkselectioncount}} {{/str}}
</div>
</div>
</div>
+71
View File
@@ -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/chart
Chart rendering.
Example context (json):
{
"withtable": true,
"chartdata": "null"
}
}}
<div class="chart-area" id="chart-area-{{uniqid}}">
<div class="chart-image" role="presentation" aria-describedby="chart-table-data-{{uniqid}}"></div>
<div class="chart-table {{^withtable}}accesshide{{/withtable}}">
<p class="chart-table-expand">
<a href="#" aria-controls="chart-table-data-{{uniqid}}" role="button">
{{#str}}showchartdata, moodle{{/str}}
</a>
</p>
<div class="chart-table-data" id="chart-table-data-{{uniqid}}" {{#withtable}}role="complementary" aria-expanded="false"{{/withtable}}></div>
</div>
</div>
{{#js}}
require([
'jquery',
'core/chart_builder',
'core/chart_output_chartjs',
'core/chart_output_htmltable',
], function($, Builder, Output, OutputTable) {
var data = {{{chartdata}}},
uniqid = "{{uniqid}}",
chartArea = $('#chart-area-' + uniqid),
chartImage = chartArea.find('.chart-image'),
chartTable = chartArea.find('.chart-table-data'),
chartLink = chartArea.find('.chart-table-expand a');
Builder.make(data).then(function(ChartInst) {
new Output(chartImage, ChartInst);
new OutputTable(chartTable, ChartInst);
});
chartLink.on('click', function(e) {
e.preventDefault();
if (chartTable.is(':visible')) {
chartTable.hide();
chartLink.text({{#quote}}{{#str}}showchartdata, moodle{{/str}}{{/quote}});
chartTable.attr('aria-expanded', false);
} else {
chartTable.show();
chartLink.text({{#quote}}{{#str}}hidechartdata, moodle{{/str}}{{/quote}});
chartTable.attr('aria-expanded', true);
}
});
});
{{/js}}
+57
View File
@@ -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/check/result
Moodle Check API result template.
The purpose of this template is to render result.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* status eg Ok, Warning
Example context (json):
{ "status": "OK"}
}}
{{#isna}}
{{> core/check/result/na}}
{{/isna}}
{{#isok}}
{{> core/check/result/ok}}
{{/isok}}
{{#isinfo}}
{{> core/check/result/info}}
{{/isinfo}}
{{#isunknown}}
{{> core/check/result/unknown}}
{{/isunknown}}
{{#iswarning}}
{{> core/check/result/warning}}
{{/iswarning}}
{{#iserror}}
{{> core/check/result/error}}
{{/iserror}}
{{#iscritical}}
{{> core/check/result/critical}}
{{/iscritical}}
@@ -0,0 +1,36 @@
{{!
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/check/result/critical
Moodle Check API result template.
The purpose of this template is to render result.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* status eg Ok, Warning
Example context (json):
{ "status": "OK"}
}}
<span class="badge bg-danger text-white">{{status}}</span>
+36
View File
@@ -0,0 +1,36 @@
{{!
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/check/result/error
Moodle Check API result template.
The purpose of this template is to render result.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* status eg Ok, Warning
Example context (json):
{ "status": "OK"}
}}
<span class="badge bg-danger text-white">{{status}}</span>
+36
View File
@@ -0,0 +1,36 @@
{{!
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/check/result/info
Moodle Check API result template.
The purpose of this template is to render result.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* status eg Ok, Warning
Example context (json):
{ "status": "OK"}
}}
<span class="badge bg-info text-white">{{status}}</span>
+36
View File
@@ -0,0 +1,36 @@
{{!
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/check/result/na
Moodle Check API result template.
The purpose of this template is to render result.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* status eg Ok, Warning
Example context (json):
{ "status": "OK"}
}}
<span class="badge bg-secondary text-dark">{{status}}</span>
+36
View File
@@ -0,0 +1,36 @@
{{!
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/check/result/ok
Moodle Check API result template.
The purpose of this template is to render result.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* status eg Ok, Warning
Example context (json):
{ "status": "OK"}
}}
<span class="badge bg-success text-white">{{status}}</span>
@@ -0,0 +1,36 @@
{{!
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/check/result/unknown
Moodle Check API result template.
The purpose of this template is to render result.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* status eg Ok, Warning
Example context (json):
{ "status": "OK"}
}}
<span class="badge bg-success text-white">{{status}}</span>
@@ -0,0 +1,36 @@
{{!
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/check/result/warning
Moodle Check API result template.
The purpose of this template is to render result.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* status eg Ok, Warning
Example context (json):
{ "status": "OK"}
}}
<span class="badge bg-warning text-dark">{{status}}</span>
@@ -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/checkbox-toggleall-master-button
Template for a master button in a toggle group. The master button toggles the checked states of the slave checkboxes.
Data attributes required for JS:
* data-action
* data-toggle
* data-togglegroup
Example context (json):
{
"id": "select-all",
"name": "select-all",
"togglegroup": "toggle-group",
"label": "Select everything!",
"checked": true,
"classes": "btn-primary btn-lg",
"selectall": "Select all",
"deselectall": "Deselect all"
}
}}
<button type="button" id="{{id}}" name="{{name}}" class="btn {{^classes}}btn-secondary{{/classes}}{{#classes}}{{.}}{{/classes}}"
data-action="toggle"
data-toggle="master"
data-togglegroup="{{togglegroup}}"
data-toggle-selectall="{{selectall}}"
data-toggle-deselectall="{{deselectall}}"
data-checkall="{{#checked}}0{{/checked}}{{^checked}}1{{/checked}}">
{{#checked}}{{deselectall}}{{/checked}}
{{^checked}}{{selectall}}{{/checked}}
</button>
{{#js}}
require(['core/checkbox-toggleall'], function(ToggleAll) {
ToggleAll.init();
});
{{/js}}
@@ -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/checkbox-toggleall-master
Template for a master checkbox in a toggle group. The master checkbox toggles the checked states of the slave checkboxes.
Data attributes required for JS:
* data-action
* data-toggle
* data-togglegroup
Example context (json):
{
"id": "select-all",
"name": "select-all",
"togglegroup": "toggle-group",
"label": "Select everything!",
"checked": true,
"classes": "p-1",
"selectall": "Select all",
"deselectall": "Deselect all",
"labelclasses": "badge bg-info text-white"
}
}}
<div class="form-check">
<input id="{{id}}" name="{{name}}" type="checkbox" class="{{classes}}" value="{{value}}"
aria-labelledby="{{id}}-label"
data-action="toggle"
data-toggle="master"
data-togglegroup="{{togglegroup}}"
data-toggle-selectall="{{selectall}}"
data-toggle-deselectall="{{deselectall}}"
{{#checked}}checked="checked"{{/checked}}
/>
<label id="{{id}}-label" for="{{id}}" class="form-check-label d-block pr-2 {{labelclasses}}">{{label}}</label>
</div>
{{#js}}
require(['core/checkbox-toggleall'], function(ToggleAll) {
ToggleAll.init();
});
{{/js}}
@@ -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/checkbox-toggleall-slave
Template for a slave checkbox in a toggle group.
Data attributes required for JS:
* data-action
* data-toggle
* data-togglegroup
Example context (json):
{
"id": "select-item",
"name": "select-item",
"togglegroup": "toggle-group",
"label": "Select me!",
"checked": true,
"classes": "p-1",
"labelclasses": "badge bg-info text-white"
}
}}
<input id="{{id}}" name="{{name}}" type="checkbox" {{#classes}}class="{{.}}"{{/classes}} value="{{value}}"
data-action="toggle"
data-toggle="slave"
data-togglegroup="{{togglegroup}}"
{{#checked}}checked="checked"{{/checked}}
/>
{{#label}}
<label for="{{id}}" class="{{labelclasses}}">{{{.}}}</label>
{{/label}}
+34
View File
@@ -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/checkbox
Chooser search template.
Example context (json):
{
"name": "fullsearch",
"id": "fullsearch",
"checked": true,
"value": "1",
"label": "Reset options"
}
}}
<div class="custom-control custom-checkbox">
<input type="checkbox" name={{{ name }}} class="custom-control-input" value={{{ value }}} id="{{{ id }}}" {{#checked}} checked="checked" {{/checked}}>
<label class="custom-control-label" for="{{{ id }}}">{{{ label }}}</label>
</div>
+78
View File
@@ -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/chooser
Chooser.
Example context (json):
{
"title": "Chooser title",
"method": "post",
"actionurl": "http://example.org/test",
"instructions": "Choose one:",
"paramname": "param",
"sections": [{
"id": "section-1",
"label": "Section one",
"items": [{
"label": "item one",
"description": "description one"
}]
}]
}
}}
<div class="hd choosertitle">
{{title}}
</div>
<div class="chooserdialoguebody">
<div class="choosercontainer">
<div id="chooseform">
<form action="{{actionurl}}" id="chooserform" method="{{method}}">
<div id="typeformdiv">
{{#params}}
<input type="hidden" id="{{id}}" name="{{name}}" value="{{value}}">
{{/params}}
<input type="hidden" name="sesskey" value="{{sesskey}}">
</div>
<div class="options">
<div class="instruction">
{{instructions}}
</div>
<div class="alloptions">
{{#sections}}
<fieldset>
<legend class="moduletypetitle">{{label}}</legend>
{{#items}}
{{>core/chooser_item}}
{{/items}}
</fieldset>
{{/sections}}
</div>
</div>
<div class="submitbuttons">
<input type="submit" name="submitbutton" class="submitbutton btn btn-primary" value="{{#cleanstr}}add{{/cleanstr}}">
<input type="submit" name="addcancel" class="addcancel btn btn-secondary" value="{{#cleanstr}}cancel{{/cleanstr}}">
</div>
</form>
</div>
</div>
</div>
+44
View File
@@ -0,0 +1,44 @@
{{!
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/chooser_item
Chooser item.
Example context (json):
{
"id": "1",
"paramname": "param",
"value": "1",
"label": "item one",
"description": "description one"
}
}}
<div class="option">
<label for="item_{{id}}">
<input type="radio" name="{{paramname}}" id="item_{{id}}" value="{{value}}">
<span class="modicon">
{{#icon}}
{{>core/pix_icon}}
{{/icon}}
</span>
<span class="typename">{{label}}</span>
</label>
<div class="typesummary">
{{{description}}}
</div>
</div>
+48
View File
@@ -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/columns-1to1to1
Moodle columns-1to1to1 template.
The purpose of this template is to render a template with 3 columns.
On mobile the columns stack underneath each other.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* col1content Column 1 contents.
* col2content Column 2 contents.
* col3content Column 3 contents.
Example context (json):
{
"col1content": "<div class='alert alert-error'>1. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam pellentesque id urna sit amet tempor.</div>",
"col2content": "<div class='alert alert-success'>2. Donec lacus nisl, molestie eget sodales non, sodales et nibh. Praesent dignissim placerat sodales.</div>",
"col3content": "<div class='alert alert-info'>3. Praesent sit amet ante odio. In mollis nisl at mi bibendum venenatis.</div>"
}
}}
<div class="row">
<div class="col-md-4">{{$ column1 }}{{{ col1content }}}{{/ column1 }}</div>
<div class="col-md-4">{{$ column2 }}{{{ col2content }}}{{/ column2 }}</div>
<div class="col-md-4">{{$ column3 }}{{{ col3content }}}{{/ column3 }}</div>
</div>
+45
View File
@@ -0,0 +1,45 @@
{{!
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/columns-1to2
Moodle columns-1to2 template.
The purpose of this template is to render 2 columns where the second column has twice the width of the first one.
On mobile the second column collapses underneath the first.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* col1content Column 1 contents.
* col2content Column 2 contents.
Example context (json):
{
"col1content": "<div class='alert alert-info'>1. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In porttitor vulputate turpis, quis tempor arcu.</div>",
"col2content": "<div class='alert alert-success'>2. Vivamus ac orci in velit fringilla aliquam a a nisl. Cras luctus quam laoreet magna pulvinar aliquet.</div>"
}
}}
<div class="row">
<div class="col-md-4">{{$ column1 }}{{{ col1content }}}{{/ column1 }}</div>
<div class="col-md-8">{{$ column2 }}{{{ col2content }}}{{/ column2 }}</div>
</div>
+44
View File
@@ -0,0 +1,44 @@
{{!
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/columns-2to1
Moodle columns-2to1 template.
The purpose of this template is to render 2 columns where the first column has twice the width of the second one.
On mobile the second column collapses underneath the first.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* col1content Column 1 contents.
* col2content Column 2 contents.
Example context (json):
{
"col1content": "<div class='alert alert-info'>1. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In porttitor vulputate turpis, quis tempor arcu.</div>",
"col2content": "<div class='alert alert-success'>2. Vivamus ac orci in velit fringilla aliquam a a nisl. Cras luctus quam laoreet magna pulvinar aliquet.</div>"
}
}}
<div class="row">
<div class="col-md-8">{{$ column1 }}{{{ col1content }}}{{/ column1 }}</div>
<div class="col-md-4">{{$ column2 }}{{{ col2content }}}{{/ column2 }}</div>
</div>
@@ -0,0 +1,40 @@
{{!
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/columns-autoflow-1to1to1
Moodle columns-autoflow-1to1to1 template.
The purpose of this template is to render a template with 3 columns where the content automatically
flows from one column to the next in order to balance all 3 columns. Based on CSS3.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* message Content that will be displayed in three columns.
Example context (json):
{
"message": "<div class='alert alert-info'>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean tincidunt interdum tellus, id ullamcorper magna fringilla nec. Mauris lacinia ipsum vel mollis vehicula. Vivamus hendrerit lacinia efficitur. Sed feugiat nunc condimentum dui faucibus, nec facilisis ipsum egestas. Proin venenatis turpis nec felis molestie porttitor. Nulla et orci lectus.</div>"
}
}}
<div class="columns-autoflow-1to1to1">{{$ content }}{{{ message }}}{{/ content }}</div>
+92
View File
@@ -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/comboboxsearch
Combobox search selector dropdown.
Context variables required for this template:
* label - The label for the the combobox.
* name - The name of the input element representing the combobox.
* value - The value of the input element representing the combobox.
* renderlater - This determines if we show a placeholder whilst fetching content to replace within the placeholder region
* buttonheader - The header to be shown above the button
* buttoncontent - The string to be shown to users to trigger the dropdown
* usebutton - If we want to use a button to trigger the dropdown, or just the dropdown itself
* dropdowncontent - If rendering now, The content within the dropdown
* parentclasses - Our class for the DOM Node that the default bootstrap dropdown events are tagged onto
* buttonclasses - If you want special handling add classes here
* dropdownclasses - If you want special handling or sizing etc add classes here
* instance - The instance ID of the tertiary navigation dropdown
Example context (json):
{
"label": "Example searchable combobox",
"name": "input-1",
"value": "0",
"renderlater": false,
"buttonheader": "Example:",
"usebutton": true,
"buttoncontent": "Dropdown button",
"dropdowncontent": "Some body content to render right now",
"parentclasses": "my-dropdown",
"buttonclasses": "my-button",
"dropdownclasses": "my-cool-dropdown",
"instance": 25
}
}}
{{#buttonheader}}
<small>{{.}}</small>
{{/buttonheader}}
<div class="{{#parentclasses}}{{.}}{{/parentclasses}} dropdown" data-instance="{{instance}}">
{{#usebutton}}
<div tabindex="0"
data-toggle="dropdown"
aria-expanded="false"
role="combobox"
aria-haspopup="dialog"
aria-controls="dialog-{{instance}}-{{uniqid}}"
class="{{#buttonclasses}}{{.}}{{/buttonclasses}} btn dropdown-toggle d-flex text-left align-items-center p-0 font-weight-bold"
aria-label="{{label}}"
data-input-element="input-{{instance}}-{{uniqid}}">
{{{buttoncontent}}}
</div>
<input type="hidden" name="{{name}}" value="{{value}}" id="input-{{instance}}-{{uniqid}}"/>
{{/usebutton}}
{{^usebutton}}{{{buttoncontent}}}{{/usebutton}}
<div class="{{#dropdownclasses}}{{.}}{{/dropdownclasses}} dropdown-menu"
id="dialog-{{instance}}-{{uniqid}}"
{{#usebutton}}
role="dialog"
aria-modal="true"
aria-label="{{label}}"
{{/usebutton}}
>
<div class="w-100 p-3" data-region="placeholder">
{{#renderlater}}
<div class="d-flex flex-column align-items-stretch justify-content-between" style="height: 150px; width: 300px;">
<div class="bg-pulse-grey w-100 h-100 my-1"></div>
<div class="bg-pulse-grey w-100 h-100 my-1"></div>
<div class="bg-pulse-grey w-100 h-100 my-1"></div>
</div>
{{/renderlater}}
{{^renderlater}}
{{{dropdowncontent}}}
{{/renderlater}}
</div>
</div>
</div>
@@ -0,0 +1,106 @@
{{!
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/content/export/course_index
Renders content for a course index.
This template is not for use within moodle.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* global
Example context (json):
{
"global": {
"righttoleft": 0,
"language": "en",
"sitename": "Kevin's Emporium of fine course material",
"siteurl": "https://kevin.example.com",
"pathtotop": "./",
"contentexportfooter": "This file is part of the content downloaded from <a href='https://example.com'>Kevin's Emporium of fine course material</a> by Jennifer Collins on Tuesday, 24th February 2021, 12:21 am.",
"contentexportsummary": "This file is part of the content downloaded from <a href='https://example.com/course/view.php?id=4'>Kevin's Emporium of fine course material</a> on Tuesday, 24th February 2021, 12:21 am.",
"coursename": "Marketing 101",
"courseshortname": "MKT101",
"courselink": "https://example.com/course/view.php?id=4",
"exportdate": "Tuesday, 24th February 2021, 12:21 am",
"maxfilesize": "40MB"
},
"aboutpagelink": "./about.html",
"sections": [
{
"title": "Welcome",
"summary": "<p>Welcome to my <em>awesome</em> course.</p>",
"activities": [
{
"title": "Data Structures - Arrays and Objects",
"modname": "Assignment",
"link": "./dsao_.1/index.html"
},
{
"title": "Data Structures - Discussion",
"modname": "Forum",
"link": "./dsao_.2/index.html"
},
{
"title": "Data Structures - Lecture Notes",
"modname": "Folder",
"link": "./dsao_.3/index.html"
}
]
}
]
}
}}
{{<core/content/export/external_page}}
{{$pagecontent}}
<div class="alert alert-info alert-block">
{{{global.contentexportsummary}}}
</div>
{{#aboutpagelink}}
<div>
<a href="{{{aboutpagelink}}}">{{#str}}contentexport_aboutthiscourse, core{{/str}}</a>
</div>
{{/aboutpagelink}}
{{#sections.0}}
<div>
{{#sections}}
<h3>{{{title}}}</h3>
{{#summary}}
<div>
{{{summary}}}
</div>
{{/summary}}
{{#activities.0}}
<ul>
{{#activities}}
<li><a href="{{{link}}}">{{{title}}} ({{{modname}}})</a></li>
{{/activities}}
</ul>
{{/activities.0}}
<hr>
{{/sections}}
</div>
{{/sections.0}}
{{/pagecontent}}
{{/core/content/export/external_page}}
@@ -0,0 +1,88 @@
{{!
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/content/export/course_summary
Renders course summary and overview information.
This template is not for use within moodle.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* global
Example context (json):
{
"global": {
"righttoleft": 0,
"language": "en",
"sitename": "Kevin's Emporium of fine course material",
"siteurl": "https://kevin.example.com",
"pathtotop": "./",
"contentexportfooter": "This file is part of the content downloaded from <a href='https://example.com'>Kevin's Emporium of fine course material</a> by Jennifer Collins on Tuesday, 24th February 2021, 12:21 am.",
"contentexportsummary": "This file is part of the content downloaded from <a href='https://example.com/course/view.php?id=4'>Kevin's Emporium of fine course material</a> on Tuesday, 24th February 2021, 12:21 am.",
"coursename": "Marketing 101",
"courseshortname": "MKT101",
"courselink": "https://example.com/course/view.php?id=4",
"exportdate": "Tuesday, 24th February 2021, 12:21 am",
"maxfilesize": "40MB"
},
"summary": "<p>This is a summary of the course, and it may contain PLUGINFILE references.</p>",
"overviewfiles": [
{
"filepath": "./_course/overviewfiles/example.pdf",
"filename": "Example PDF"
},
{
"filepath": "./_course/overviewfiles/example.jpg",
"filename": "Example JPG"
}
]
}
}}
{{<core/content/export/external_page}}
{{$pagecontent}}
<div class="alert alert-info alert-block">
{{{global.contentexportsummary}}}
</div>
{{#summary}}
<h2>{{#str}}summary, core{{/str}}</h2>
<div>
{{{summary}}}
</div>
<hr>
{{/summary}}
{{#overviewfiles.0}}
<h2>{{#str}}courseoverviewfiles, core{{/str}}</h2>
<div>
{{#overviewfiles.0}}
<ul>
{{#overviewfiles}}
<li><a href="{{filepath}}" title="{{#str}}contentexport_viewfilename, core, {{filename}}{{/str}}">{{filename}}</a></li>
{{/overviewfiles}}
</ul>
{{/overviewfiles.0}}
</div>
<hr>
{{/overviewfiles.0}}
{{/pagecontent}}
{{/core/content/export/external_page}}
@@ -0,0 +1,81 @@
{{!
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/content/export/external_page
Renders content in a basic HTML wrapper designed for viewing offline.
This template is not for use within moodle.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* global
Example context (json):
{
"global": {
"righttoleft": 0,
"language": "en",
"sitename": "Kevin's Emporium of fine course material",
"siteurl": "https://kevin.example.com",
"pathtotop": "./",
"contentexportfooter": "This file is part of the content downloaded from <a href='https://example.com'>Kevin's Emporium of fine course material</a> by Jennifer Collins on Tuesday, 24th February 2021, 12:21 am.",
"contentexportsummary": "This file is part of the content downloaded from <a href='https://example.com/course/view.php?id=4'>Kevin's Emporium of fine course material</a> on Tuesday, 24th February 2021, 12:21 am.",
"coursename": "Marketing 101",
"courseshortname": "MKT101",
"courselink": "https://example.com/course/view.php?id=4",
"exportdate": "Tuesday, 24th February 2021, 12:21 am",
"maxfilesize": "40MB"
}
}
}}
<!DOCTYPE html>
<html lang="{{global.language}}"{{#global.righttoleft}} dir="rtl"{{/global.righttoleft}}>
<head>
<meta charset="UTF-8">
<title>{{{global.sitename}}} - {{{global.coursename}}}</title>
<link rel="stylesheet" type="text/css" href="{{global.pathtotop}}/shared/moodle.css" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
</head>
<body>
<div class="d-flex flex-column h-100">
<nav class="navbar navbar-light bg-white border-bottom">
<div class="container-fluid p-0">
<a class="navbar-brand" href="{{{global.siteurl}}}" title="{{{global.sitename}}}">
{{{global.sitename}}}
</a>
</div>
</nav>
<main class="container-fluid mt-2 flex-grow-1 flex-shrink-1">
<div>
<h1><a href="{{global.pathtotop}}index.html">{{{global.coursename}}}</a></h1>
<p>{{global.courseshortname}}</p>
{{$pagecontent}}{{/pagecontent}}
</div>
</main>
<footer id="page-footer" class="py-3">
<div class="container">
<div>{{{global.contentexportfooter}}}</div>
</div>
</footer>
</div>
</body>
</html>
@@ -0,0 +1,112 @@
{{!
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/content/export/module_index
Renders content for a course index.
This template is not for use within moodle.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* global
Example context (json):
{
"global": {
"righttoleft": 0,
"language": "en",
"sitename": "Kevin's Emporium of fine course material",
"siteurl": "https://kevin.example.com",
"pathtotop": "./",
"contentexportfooter": "This file is part of the content downloaded from <a href='https://example.com'>Kevin's Emporium of fine course material</a> by Jennifer Collins on Tuesday, 24th February 2021, 12:21 am.",
"contentexportsummary": "This file is part of the content downloaded from <a href='https://example.com/course/view.php?id=4'>Kevin's Emporium of fine course material</a> on Tuesday, 24th February 2021, 12:21 am.",
"coursename": "Marketing 101",
"courseshortname": "MKT101",
"courselink": "https://example.com/course/view.php?id=4",
"exportdate": "Tuesday, 24th February 2021, 12:21 am",
"maxfilesize": "40MB"
},
"modulename": "Data Structures - Discussion",
"modulelink": "https://kevin.example.com/mod/forum/view.php?id=53",
"intro": "<p>This forum provides a place for you to discuss the concepts of data structures.</p>",
"sections": [
{
"title": "The title set in an exportable_item",
"content": "<p>Some text area included in an exportable_item.</p>",
"files": [
{
"filename": "Example file which was not included in the text field above",
"filepath": "./sections/0/_files"
}
]
}
]
}
}}
{{<core/content/export/external_page}}
{{$pagecontent}}
<h2>
{{{modulename}}}
</h2>
<div class="alert alert-info alert-block">
{{#str}}contentexport_modulesummary, core,
{
"modulelink": "{{modulelink}}",
"modulename": {{#quote}}{{{modulename}}}{{/quote}},
"date": "{{global.exportdate}}",
"maxfilesize": "{{global.maxfilesize}}"
}
{{/str}}
</div>
{{#intro}}
<h3>{{#str}}moduleintro, core{{/str}}</h3>
<div>
{{{intro}}}
</div>
<hr>
{{/intro}}
{{#sections}}
<div>
<h3>{{{title}}}</h3>
<div>
{{#content}}
<div>
{{{content}}}
</div>
{{/content}}
{{#files.0}}
<ul>
{{#files}}
<li><a href="{{filepath}}" title="{{#str}}contentexport_viewfilename, core, {{filename}}{{/str}}">{{filename}}</a></li>
{{/files}}
</ul>
{{/files.0}}
</div>
</div>
<hr>
{{/sections}}
{{/pagecontent}}
{{/core/content/export/external_page}}
+75
View File
@@ -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/context_header
Context header template.
Example context (json):
{
"heading": "<h2>Page title</h2>",
"prefix": "Page prefix",
"hasadditionalbuttons": true,
"additionalbuttons": [
{
"url": "http://example.com",
"title": "Button title",
"formattedimage": "http://example.com/image.jpg",
"attributes": [
{
"name": "data-attribute",
"value": "attribute value"
},
{
"name": "class",
"value": "btn btn-primary"
}
]
}
]
}
}}
<div class="page-context-header d-flex align-items-center mb-2">
{{#imagedata}}
<div class="page-header-image">
{{{imagedata}}}
</div>
{{/imagedata}}
<div class="page-header-headings">
{{#prefix}}
<div class="text-muted text-uppercase small line-height-3">
{{{prefix}}}
</div>
{{/prefix}}
{{{heading}}}
</div>
{{#hasadditionalbuttons}}
<div class="btn-group header-button-group mx-3">
{{#additionalbuttons}}
<a href="{{url}}" {{#attributes}} {{name}}="{{value}}" {{/attributes}}>
{{#page}}
{{#pix}}{{formattedimage}}{{/pix}}
<span class="header-button-title">{{title}}</span>
{{/page}}
{{^page}}
<img src="{{formattedimage}}" alt="{{title}}">
{{/page}}
</a>
{{/additionalbuttons}}
</div>
{{/hasadditionalbuttons}}
</div>
+41
View File
@@ -0,0 +1,41 @@
{{!
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/copy_box
Interface element to contain text that the user should copy. Will automaticaly select when clicked.
Classes required for JS:
* copy_box
Data attributes required for JS:
* none
Context variables required for this template:
* text The content to be displayed ready for copying
Example context (json):
{ "text": "Copyable text"}
}}
<input type="text" class="copy_box" value="{{{ text }}}" readonly="readonly" size="48" {{#id}}id="{{id}}-{{uniqid}}"{{/id}}/>
{{# js }}
require(['jquery'], function($) {
$('.copy_box').on('click', function() {
$(this).select();
});
});
{{/ js }}
+56
View File
@@ -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/custom_menu_item
This template renders a node as part of a submenu.
Example context (json):
{
"divider": "",
"haschildren": "1",
"uniqid": "Unique string",
"text": "Moodle community",
"children": "[custom_menu_item object]",
"title": "Moodle community",
"url": "https://moodle.org"
}
}}
{{^divider}}
{{#haschildren}}
<li class="dropdown nav-item">
<a class="dropdown-toggle nav-link" id="drop-down-{{uniqid}}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" href="#" {{#title}}title="{{{title}}}"{{/title}} aria-controls="drop-down-menu-{{uniqid}}">
{{{text}}}
</a>
<div class="dropdown-menu" role="menu" id="drop-down-menu-{{uniqid}}" aria-labelledby="drop-down-{{uniqid}}">
{{#children}}
{{^divider}}
<a class="dropdown-item" role="menuitem" href="{{{url}}}" {{#title}}title="{{{title}}}"{{/title}} {{#attributes}}{{key}}="{{value}}" {{/attributes}}>{{{text}}}</a>
{{/divider}}
{{#divider}}
<div class="dropdown-divider" role="presentation"></div>
{{/divider}}
{{/children}}
</div>
</li>
{{/haschildren}}
{{^haschildren}}
<li class="nav-item">
<a class="nav-link" href="{{{url}}}" {{#title}}title="{{{title}}}"{{/title}}>{{{text}}}</a>
</li>
{{/haschildren}}
{{/divider}}
@@ -0,0 +1,38 @@
{{!
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/datafilter/autocomplete_layout
Moodle template for the layout of autocomplete elements.
Classes required for JS:
* none
Data attributes required for JS:
* data-region="form_autocomplete-input"
* data-region="form_autocomplete-suggestions"
* data-region="form_autocomplete-selection"
Context variables required for this template:
* none
Example context (json):
{}
}}
<div data-region="form_autocomplete-input"></div>
<div data-region="form_autocomplete-suggestions"></div>
<div data-region="form_autocomplete-selection"></div>
@@ -0,0 +1,51 @@
{{!
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/datafilter/autocomplete_selection
Moodle template for the wrapper of currently selected items in an autocomplate form element.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* multiple True if this field allows multiple selections
* selectionId The dom id of the current selection list.
* items List of items with label and value fields (used by the partial).
* noSelectionString String to use when no items are selected (used by the partial).
Example context (json):
{ "multiple": true, "selectionId": 1, "items": [
{ "label": "Item label with <strong>tags</strong>", "value": "5" },
{ "label": "Another item label with <strong>tags</strong>", "value": "4" }
], "noSelectionString": "No selection" }
}}
<span class="sr-only" id="{{selectionId}}-label">{{#str}}selecteditems, form{{/str}}</span>
<div{{!
}} class="form-autocomplete-selection d-inline-block my-0{{#multiple}} form-autocomplete-multiple h5{{/multiple}}"{{!
}} id="{{selectionId}}"{{!
}} aria-labelledby="{{selectionId}}-label"{{!
}} role="listbox"{{!
}} aria-atomic="true"{{!
}} tabindex="0"{{!
}}{{#multiple}} aria-multiselectable="true"{{/multiple}}{{!
}}>
{{> core/form_autocomplete_selection_items }}
</div>
@@ -0,0 +1,51 @@
{{!
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/datafilter/autocomplete_selection_items
Moodle template for the currently selected items in an autocomplete form element.
Classes required for JS:
* none
Data attributes required for JS:
* data-value
Context variables required for this template:
* items List of items with label and value fields.
* - value Value of the selected item.
* - label HTML representing the value.
* noSelectionString String to use when no items are selected
Example context (json):
{
"items": [
{ "label": "Item label with <strong>tags</strong>", "value": "5" },
{ "label": "Another item label with <strong>tags</strong>", "value": "4" }
],
"noSelectionString": "No selection"
}
}}
{{#items}}
<span role="option" data-value="{{value}}" aria-selected="true"
class="badge bg-secondary text-dark clickable text-wrap text-break line-height-4 m-1">
{{{label}}}<i class="icon fa fa-times pl-2 mr-0"></i>
</span>
{{/items}}
{{^items}}
<span class="mb-3 mr-1">{{noSelectionString}}</span>
{{/items}}
+63
View File
@@ -0,0 +1,63 @@
{{!
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/datafilter/filter
Template for the form containing one or more filter rows.
Example context (json):
{
"filtertypes": [
{
"name": "status",
"title": "Status",
"values": [
{
"value": 1,
"title": "Active"
},
{
"value": 0,
"title": "Suspended"
}
]
}
]
}
}}
<div id="core-filter-{{uniqid}}" class="filter-group my-2 p-2 bg-light border-radius border" data-table-region="{{tableregionid}}" data-table-course-id="{{courseid}}" data-filterverb="2">
{{> core/datafilter/filter_match }}
<div data-filterregion="filters">
{{> core/datafilter/filter_row }}
</div>
<div class="d-flex" data-filterregion="actions">
&nbsp;
<button type="button" class="btn btn-link text-reset" data-filteraction="add">
{{#pix}}t/add{{/pix}}<span class="pl-3">{{#str}}addcondition{{/str}}</span>
</button>
<button data-filteraction="reset" type="button" class="btn btn-secondary ml-auto mr-2">{{#str}}clearfilters{{/str}}</button>
<button data-filteraction="apply" type="button" class="btn btn-primary">{{#str}}applyfilters{{/str}}</button>
</div>
{{> core/datafilter/filter_types }}
</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/datafilter/filter_match
Template for the form containing one or more filter rows.
Example context (json):
{
"filtertypes": [
{
"name": "status",
"title": "Status",
"values": [
{
"value": 1,
"title": "Active"
},
{
"value": 0,
"title": "Suspended"
}
]
}
]
}
}}
<div data-filterregion="filtermatch" class="hidden">
<label for="core-filter-jointype-{{uniqid}}" class="my-0" aria-hidden="true">
{{#str}}match{{/str}}
</label>
<select class="custom-select" data-filterfield="join" id="core-filter-jointype-{{uniqid}}"
aria-label="{{#str}}filtersetmatchdescription{{/str}}">
<option value="0">{{#str}}none{{/str}}</option>
<option value="1">{{#str}}any{{/str}}</option>
<option value="2" selected>{{#str}}all{{/str}}</option>
</select>
<span aria-hidden="true">{{#str}}matchofthefollowing{{/str}}</span>
</div>
@@ -0,0 +1,69 @@
{{!
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/datafilter/filter_row
Template for use by each filter condition.
Context variables required for this template:
* filtertypes - Array of filter types available.
Example context (json):
{
"filtertypes": [
{
"name": "status",
"title": "Status"
}
],
"rownumber": 1
}
}}
<div data-filterregion="filter" data-filter-type="">
<fieldset>
<legend class="sr-only">{{#str}}filterrowlegend, core, {{rownumber}}{{/str}}</legend>
<div class="border-radius my-2 p-2 bg-white border d-flex flex-column flex-md-row align-items-md-stretch mr-0 ml-0 row">
<div class="d-flex flex-column flex-md-row align-items-md-center my-1">
<label for="core-filter_row-jointype-{{uniqid}}" class="mr-md-2 mb-md-0">{{#str}}match{{/str}}</label>
<select class="custom-select mb-1 mb-md-0 mr-md-2" data-filterfield="join" id="core-filter_row-jointype-{{uniqid}}">
<option value="0">{{#str}}none{{/str}}</option>
<option selected=selected value="1">{{#str}}any{{/str}}</option>
<option value="2">{{#str}}all{{/str}}</option>
</select>
</div>
<label class="sr-only pt-2 my-1" for="core-filter_row-filtertype-{{uniqid}}">{{#str}}filtertype{{/str}}</label>
<select class="custom-select my-1 mb-md-0 mr-md-2" data-filterfield="type" id="core-filter_row-filtertype-{{uniqid}}">
<option value="">{{#str}}selectfiltertype{{/str}}</option>
{{#filtertypes}}
<option value="{{name}}">{{title}}</option>
{{/filtertypes}}
</select>
<div data-filterregion="value" class="d-md-block flex-column align-items-start flex-lg-row my-1"></div>
<button data-filteraction="remove" class="ml-auto icon-no-margin icon-size-4 btn text-reset" aria-label="{{#str}}clearfilterrow{{/str}}">
{{#pix}}e/cancel_solid_circle{{/pix}}
</button>
</div>
<div data-filterregion="joinadverb" class="pl-1 text-uppercase font-weight-bold">
<div data-filterverbfor="0">{{#str}}operator_andnot{{/str}}</div>
<div data-filterverbfor="1">{{#str}}operator_or{{/str}}</div>
<div data-filterverbfor="2">{{#str}}operator_and{{/str}}</div>
</div>
</fieldset>
</div>
@@ -0,0 +1,63 @@
{{!
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/datafilter/filter_type
Filter type data, not shown to users but used as a source of data for form autocompletion.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* filtertypes
Example context (json):
{
"name": "status",
"title": "Enrolment Status",
"allowcustom": "0",
"allowmultiple": false,
"filtertypeclass": "core/filter_types/courseid",
"values": [
{
"value": "0",
"title": "Inactive"
},
{
"value": "1",
"title": "Active"
}
]
}
}}
<select {{!
}}{{#allowmultiple}}multiple="multiple"{{/allowmultiple}} {{!
}}data-field-name="{{name}}" {{!
}}data-field-title="{{title}}" {{!
}}data-allow-custom="{{allowcustom}}" {{!
}}data-required="{{required}}" {{!
}}data-join-list="{{joinlist}}" {{!
}}class="hidden" {{!
}}{{#filtertypeclass}}data-filter-type-class="{{filtertypeclass}}" {{/filtertypeclass}}{{!
}}>
{{#values}}
<option value="{{value}}"{{#disabled}} disabled{{/disabled}}{{#classes}} class="{{{classes}}}"{{/classes}}>{{{title}}}</option>
{{/values}}
</select>
@@ -0,0 +1,64 @@
{{!
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/datafilter/filter_types
Placeholder to fetch all filter types.
Classes required for JS:
* none
Data attributes required for JS:
* data-filterregion="filtertypedata"
Context variables required for this template:
* filtertypes
Example context (json):
{
"filtertypes": [
{
"name": "status",
"title": "Enrolment Status",
"allowcustom": "0",
"values": [
{
"value": "0",
"title": "Inactive"
},
{
"value": "1",
"title": "Active"
}
]
}
]
}
}}
<div class="hidden" data-filterregion="filtertypedata">
{{#filtertypes}}
{{> core/datafilter/filter_type}}
{{/filtertypes}}
</div>
<div class="hidden">
<select disabled="disabled" data-filterfield="type" data-filterregion="filtertypelist">
<option value="">{{#str}}selectfiltertype{{/str}}</option>
{{#filtertypes}}
<option value="{{name}}">{{title}}</option>
{{/filtertypes}}
</select>
</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/datafilter/filtertypes/binary_selector
Moodle template for hidden, questiontext and subcategories filter.
Context variables required for this template:
* filtertype - filter type name for dataset filterfield.
* textvalueone - text value for first selection.
* textvaluetwo - text value for second selection.
* optionone - boolen for first option selection.
* optiontwo - boolean for second option selection.
Example context (json):
{
"title": "Show hidden questions",
"filtertype": "hidden",
"textvalueone": "yes",
"textvaluetwo": "no",
"optionone": false,
"optiontwo": true
}
}}
<div class="d-flex flex-column flex-md-row align-items-md-center" data-required="{{required}}">
<label for="core-filter_row-binary-{{uniqid}}" class="sr-only">{{title}}</label>
<select {{!
}}class="custom-select mb-1 mb-md-0 mr-md-2" {{!
}}name="{{filtertype}}" {{!
}}data-filterfield="{{filtertype}}" {{!
}}data-field-title="{{title}}" {{!
}}id="core-filter_row-binary-{{uniqid}}"{{!
}}>
{{#options}}
<option{{#selected}} selected{{/selected}} value="{{value}}">{{text}}</option>
{{/options}}
</select>
</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/dataformat_selector
Context variables required for this template:
* label
* base
* name
* params
* options
* sesskey
* submit
Example context (json):
{
"base": "http://example.org/",
"name": "test",
"value": "test",
"label": "Download table data as",
"params": false,
"options": [{"label": "CSV", "name": "csv"}, {"label": "Excel", "name": "excel"}],
"submit": "Download",
"sesskey": ""
}
}}
<form method="get" action="{{base}}" class="dataformatselector m-1">
<div class="d-flex flex-wrap align-items-end text-xs-right">
<input type="hidden" name="sesskey" value="{{sesskey}}">
<label for="downloadtype_{{name}}" class="mr-1">{{label}}</label>
<select name="{{name}}" id="downloadtype_{{name}}" class="form-control custom-select mr-1">
{{#options}}
<option value="{{value}}">{{label}}</option>
{{/options}}
</select>
<button type="submit" class="btn btn-secondary">{{submit}}</button>
{{#params}}
<input type="hidden" name="{{name}}" value="{{value}}">
{{/params}}
</div>
</form>
+27
View File
@@ -0,0 +1,27 @@
{{!
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/drag_handle
Drag handle template.
Example context (json):
{
"movetitle": "Move this element"
}
}}
<span tabindex="0" role="button" aria-haspopup="true" data-drag-type="move" title="{{movetitle}}">{{#pix}} i/dragdrop, core {{/pix}}</span>
+44
View File
@@ -0,0 +1,44 @@
{{!
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/drawer
This template will render a generic drawer panel.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* none
Example context (json):
{}
}}
<div
id="{{$drawerid}}drawer-{{uniqid}}{{/drawerid}}"
class="{{$drawerclasses}}{{/drawerclasses}} drawer bg-white {{^show}}hidden{{/show}}"
aria-expanded="{{#show}}true{{/show}}{{^show}}false{{/show}}"
{{^show}}aria-hidden="true"{{/show}}
data-region="right-hand-drawer"
role="region"
tabindex="0"
>
{{$drawercontent}}{{/drawercontent}}
</div>
+36
View File
@@ -0,0 +1,36 @@
{{!
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/dropzone
Render dropzone for file upload
Example context (json):
{
"label": "You can drag and drop files here to upload or click to select.",
"filetypes": "image/*,application/pdf"
}
}}
<div class="dropzone-container mb-1 h-100">
<a class="dropzone-sr-only-focusable sr-only-focusable" href="#">{{# str }} addfiletext, repository {{/ str }}</a>
<div class="dropzone p-2 text-center h-100 w-100">
<div class="dropzone-icon">
{{# pix }} i/cloudupload, core, {{label}} {{/ pix }}
</div>
<div class="dropzone-label">
{{label}}
</div>
</div>
<input type="file" id="dropzone_fileinput_{{uniqid}}" accept="{{filetypes}}" class="drop-zone-fileinput hidden">
</div>
+79
View File
@@ -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/dynamic_tabs
Template for showing dynamic tabs
Example context (json):
{
"dataattributes": [ {"name": "programid", "value": "13"} ],
"showtabsnavigation": "1",
"tabs": [
{
"shortname": "tab1",
"displayname": "Tab 1",
"content": "Content of tab 1",
"enabled": "1"
},
{
"shortname": "tab2",
"displayname": "Tab 2",
"content": "Content of tab 2",
"enabled": "1"
}
]
}
}}
{{! We must not use the JS helper otherwise this gets executed too late. Tell behat to wait. }}
<script>
M.util.js_pending('core_dynamic_tabs_init');
</script>
<div class="dynamictabs">
{{#showtabsnavigation}}
<ul class="nav nav-tabs mb-4 moodle-has-zindex" id="dynamictabs-tabs" role="tablist">
{{#tabs}}
<li class="nav-item" role="presentation">
<a class="nav-link {{#active}}active{{/active}} {{^enabled}}disabled{{/enabled}}" id="{{shortname}}-tab" data-toggle="tab" href="#{{shortname}}" role="tab" aria-controls="{{shortname}}">
{{{displayname}}}
</a>
</li>
{{/tabs}}
</ul>
{{/showtabsnavigation}}
<div class="tab-content" id="dynamictabs-content">
{{#tabs}}
<div class="tab-pane fade container-fluid {{#active}}show active{{/active}}"
id="{{shortname}}"
role="tabpanel"
aria-labelledby="{{shortname}}-tab"
data-tab-content="{{shortname}}"
data-tab-class="{{tabclass}}"
{{#dataattributes}}data-{{name}}="{{value}}"{{/dataattributes}}>
{{{content}}}
</div>
{{/tabs}}
</div>
</div>
{{#js}}
require(['core/dynamic_tabs'], function(Tabs) {
Tabs.init();
M.util.js_complete('core_dynamic_tabs_init');
});
{{/js}}
+65
View File
@@ -0,0 +1,65 @@
{{!
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/editswitch
This template renders the top navbar.
Example context (json):
{
"url": "http://localhost/",
"sesskey": "sesskey",
"edit": 1,
"adminedit": true,
"checked": "",
"string": "Edit on",
"legacyseturl": "/editmode.php"
}
}}
<div class="divider border-left h-75 align-self-center ml-1 mr-3"></div>
<form action="{{{legacyseturl}}}" method="post" class="d-flex align-items-center editmode-switch-form">
<div class="input-group">
<label class="mr-2 mb-0 {{#checked}}text-primary{{/checked}}" for="{{uniqid}}-editingswitch">
{{#str}} editmode {{/str}}
</label>
<div class="custom-control custom-switch">
<input type="checkbox"{{!
}} name="setmode"{{!
}}{{#checked}}{{!
}} checked{{!
}}{{/checked}}{{!
}} class="custom-control-input"{{!
}} id="{{uniqid}}-editingswitch"{{!
}} data-context="{{{pagecontextid}}}"{{!
}} data-pageurl="{{{pageurl}}}"{{!
}}>
<span class="custom-control-label">&nbsp;</span>
</div>
</div>
<input type="hidden" name="sesskey" value="{{{sesskey}}}">
<input type="hidden" name="pageurl" value="{{{pageurl}}}">
<input type="hidden" name="context" value="{{{pagecontextid}}}">
<noscript>
<input type="submit" value="{{#str}}setmode, core{{/str}}">
</noscript>
</form>
{{#js}}
require(['core/edit_switch'], function(editSwitch) {
editSwitch.init('{{uniqid}}-editingswitch');
});
{{/js}}
+40
View File
@@ -0,0 +1,40 @@
{{!
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/email_fromname
Template for all email subjects.
Context variables required for this template:
* sitefullname
* siteshortname
* sitewwwroot
* subject
* to
* toname
* touserid
* from
* fromname
* replyto
* replytoname
Example context (json):
{
"fromname": "Joe Bloggs"
}
}}
{{{fromname}}}
+45
View File
@@ -0,0 +1,45 @@
{{!
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/email_html
Template for all html emails. Note that it may wrap content formatted
elsewhere in another a module template.
Context variables required for this template:
* sitefullname
* siteshortname
* sitewwwroot
* subject
* to
* toname
* touserid
* tousername
* from
* fromname
* replyto
* replytoname
* body
* prefix
Example context (json):
{
"prefix": "[Prefix Text]",
"body": "Email body"
}
}}
{{{body}}}
+42
View File
@@ -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/email_subject
Template for all email subjects.
Context variables required for this template:
* sitefullname
* siteshortname
* sitewwwroot
* subject
* to
* toname
* touserid
* from
* fromname
* replyto
* replytoname
* prefix
Example context (json):
{
"prefix": "[Prefix Text]",
"subject": "Email subject"
}
}}
{{#prefix}}{{{prefix}}} {{/prefix}}{{{subject}}}
+44
View File
@@ -0,0 +1,44 @@
{{!
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/email_text
Template for all html emails. Note that it may wrap content formatted
elsewhere in another a module template.
Context variables required for this template:
* sitefullname
* siteshortname
* sitewwwroot
* subject
* to
* toname
* touserid
* from
* fromname
* replyto
* replytoname
* body
* prefix
Example context (json):
{
"prefix": "[Prefix Text]",
"body": "Email body"
}
}}
{{{body}}}
@@ -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/emoji/auto_complete
This template will render the emoji auto complete.
Classes required for JS:
* none
Data attributes required for JS:
*
Context variables required for this template:
*
Example context (json):
{}
}}
<div
data-region="emoji-auto-complete"
class="emoji-auto-complete bg-white d-flex align-items-center"
>
{{#emojis}}
<button
type="button"
class="btn btn-link btn-icon p-0 rounded-lg emoji-button {{#active}}active{{/active}}"
title="{{displayshortname}}"
data-region="emoji-button"
data-unified="{{unified}}"
data-short-name="{{shortname}}"
>
{{emojitext}}
</button>
{{/emojis}}
</div>
+51
View File
@@ -0,0 +1,51 @@
{{!
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/emoji/emoji_row
This template will render the row in the emoji picker table.
Classes required for JS:
* none
Data attributes required for JS:
*
Context variables required for this template:
*
Example context (json):
{}
}}
<div
class="align-middle d-flex align-items-center justify-content-between picker-row"
data-row="{{index}}"
>
{{#emojis}}
<button
data-short-names="{{shortnames}}"
data-unified="{{unified}}"
class="btn btn-link btn-icon p-0 rounded-lg emoji-button"
title="{{shortnames}}"
>{{text}}</button>
{{/emojis}}
{{#spacers}}
<div class="emoji-button"></div>
{{/spacers}}
</div>
+38
View File
@@ -0,0 +1,38 @@
{{!
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/emoji/header_row
Header row element for the category name in the emoji picker.
Classes required for JS:
* none
Data attributes required for JS:
*
Context variables required for this template:
*
Example context (json):
{}
}}
<div class="align-middle picker-row" data-row="{{index}}">
<h3 class="h6 font-weight-bold mb-0 category-name">{{text}}</h3>
</div>
+151
View File
@@ -0,0 +1,151 @@
{{!
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/emoji/picker
This template will render the emoji picker.
Classes required for JS:
* none
Data attributes required for JS:
*
Context variables required for this template:
*
Example context (json):
{}
}}
<div
data-region="emoji-picker"
class="card shadow emoji-picker"
>
<div class="card-header px-1 pt-1 pb-0 d-flex justify-content-between flex-shrink-0">
<button
class="btn btn-outline-secondary icon-no-margin category-button rounded-0 selected"
data-action="show-category"
data-category="Recent"
title="{{#str}} emojicategoryrecent, core {{/str}}"
>
{{#pix}} i/emojicategoryrecent, core {{/pix}}
</button>
<button
class="btn btn-outline-secondary icon-no-margin category-button rounded-0"
data-action="show-category"
data-category="Smileys & Emotion"
title="{{#str}} emojicategorysmileysemotion, core {{/str}}"
>
{{#pix}} i/emojicategorysmileysemotion, core {{/pix}}
</button>
<button
class="btn btn-outline-secondary icon-no-margin category-button rounded-0"
data-action="show-category"
data-category="People & Body"
title="{{#str}} emojicategorypeoplebody, core {{/str}}"
>
{{#pix}} i/emojicategorypeoplebody, core {{/pix}}
</button>
<button
class="btn btn-outline-secondary icon-no-margin category-button rounded-0"
data-action="show-category"
data-category="Animals & Nature"
title="{{#str}} emojicategoryanimalsnature, core {{/str}}"
>
{{#pix}} i/emojicategoryanimalsnature, core {{/pix}}
</button>
<button
class="btn btn-outline-secondary icon-no-margin category-button rounded-0"
data-action="show-category"
data-category="Food & Drink"
title="{{#str}} emojicategoryfooddrink, core {{/str}}"
>
{{#pix}} i/emojicategoryfooddrink, core {{/pix}}
</button>
<button
class="btn btn-outline-secondary icon-no-margin category-button rounded-0"
data-action="show-category"
data-category="Travel & Places"
title="{{#str}} emojicategorytravelplaces, core {{/str}}"
>
{{#pix}} i/emojicategorytravelplaces, core {{/pix}}
</button>
<button
class="btn btn-outline-secondary icon-no-margin category-button rounded-0"
data-action="show-category"
data-category="Activities"
title="{{#str}} emojicategoryactivities, core {{/str}}"
>
{{#pix}} i/emojicategoryactivities, core {{/pix}}
</button>
<button
class="btn btn-outline-secondary icon-no-margin category-button rounded-0"
data-action="show-category"
data-category="Objects"
title="{{#str}} emojicategoryobjects, core {{/str}}"
>
{{#pix}} i/emojicategoryobjects, core {{/pix}}
</button>
<button
class="btn btn-outline-secondary icon-no-margin category-button rounded-0"
data-action="show-category"
data-category="Symbols"
title="{{#str}} emojicategorysymbols, core {{/str}}"
>
{{#pix}} i/emojicategorysymbols, core {{/pix}}
</button>
<button
class="btn btn-outline-secondary icon-no-margin category-button rounded-0"
data-action="show-category"
data-category="Flags"
title="{{#str}} emojicategoryflags, core {{/str}}"
>
{{#pix}} i/emojicategoryflags, core {{/pix}}
</button>
</div>
<div class="card-body p-2 d-flex flex-column overflow-hidden">
<div class="input-group mb-1 flex-shrink-0">
<div class="input-group-prepend">
<span class="input-group-text pr-0 bg-white text-muted">
{{#pix}} i/search, core {{/pix}}
</span>
</div>
<input
type="text"
class="form-control border-left-0"
placeholder="{{#str}} search, core {{/str}}"
aria-label="{{#str}} search, core {{/str}}"
data-region="search-input"
>
</div>
<div class="flex-grow-1 overflow-auto emojis-container h-100" data-region="emojis-container">
<div class="position-relative" data-region="row-container"></div>
</div>
<div class="flex-grow-1 overflow-auto search-results-container h-100 hidden" data-region="search-results-container">
<div class="position-relative" data-region="row-container"></div>
</div>
</div>
<div
class="card-footer d-flex flex-shrink-0"
data-region="footer"
>
<div class="emoji-preview" data-region="emoji-preview"></div>
<div data-region="emoji-short-name" class="emoji-short-name text-muted text-wrap ml-2"></div>
</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/external_content_banner
Moodle external content banner template.
The purpose of this template is to render an iframe that contains external content banner.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* lang User's language.
Example context (json):
{
"iframeid": "external-content",
"url": "http://example.com/link",
"title": "External content"
}
}}
<div class="alert alert-secondary alert-block fade in">
<iframe id="{{iframeid}}" title="{{title}}" class="w-100 border-0"></iframe>
</div>
{{#js}}
(function() {
var iframe = document.getElementById('{{iframeid}}');
iframe.src = '{{url}}';
window.addEventListener('message', function (event) {
if (event.source === iframe.contentWindow) {
iframe.style.height = event.data + 'px';
}
});
})();
{{/js}}
@@ -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/filemanager_chooselicense
This template renders the form label and select element for choosing a license associated with a file.
Example context (json):
{
"licensehelpicon": {
"text": "<ul><li><a href='http://en.wikipedia.org/wiki/All_rights_reserved'>All rights reserved</a></li></ul>",
"alt": "Help with Choose license"
},
"columns": true
}
}}
<div class="col-form-label form-control-label px-0 {{#columns}}col-4{{/columns}}">
<label for="choose-license-{{uniqid}}">
{{#str}}chooselicense, repository{{/str}}
</label>
{{#licensehelpicon}}{{>core/help_icon}}{{/licensehelpicon}}
</div>
<div {{#columns}}class="col-8"{{/columns}}>
<select id="choose-license-{{uniqid}}" class="form-control"></select>
</div>
@@ -0,0 +1,29 @@
{{!
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/filemanager_confirmdialog
This template renders the popup confirm dialogue windows.
Example context (json):
{}
}}
<div class="filemanager fp-dlg">
<p class="fp-dlg-text"></p>
<button class="fp-dlg-butconfirm btn-primary btn">{{#str}}ok{{/str}}</button>
<button class="fp-dlg-butcancel btn-secondary btn">{{#str}}cancel{{/str}}</button>
</div>
@@ -0,0 +1,28 @@
{{!
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/filemanager_default_searchform
This template renders the default repository searchform to be passed to Filepicker.
Example context (json):
{}
}}
<div class="fp-def-search mb-3">
<label class="sr-only" for="reposearch">{{#str}}searchrepo, repository{{/str}}</label>
<input type="search" class="form-control" id="reposearch" name="s" placeholder="{{#str}}search, repository{{/str}}"/>
</div>
@@ -0,0 +1,93 @@
{{!
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/filemanager_fileselect
This template renders the window with file information/actions.
Example context (json):
{
"helpicon": "<a class='btn ..'><i class='icon fa fa-question-circle ..'></i></a>",
"licensehelpicon": {
"text": "<ul><li><a href='http://en.wikipedia.org/wiki/All_rights_reserved'>All rights reserved</a></li></ul>",
"alt": "Help with Choose license"
},
"columns": true
}
}}
<div class="filemanager fp-select">
<div class="fp-select-loading">
{{#pix}}i/loading_small{{/pix}}
</div>
<form class="mform clearfix">
<div class="mb-3 mx-0">
<button class="fp-file-download btn btn-secondary">{{#str}}download{{/str}}</button>
<button class="fp-file-delete btn btn-secondary">{{#str}}delete{{/str}}</button>
<button class="fp-file-setmain btn btn-secondary">{{#str}}setmainfile, repository{{/str}}</button>
<span class="fp-file-setmain-help">{{{helpicon}}}</span>
<button class="fp-file-zip btn btn-secondary">{{#str}}zip, editor{{/str}}</button>
<button class="fp-file-unzip btn btn-secondary">{{#str}}unzip{{/str}}</button>
</div>
<div class="fp-saveas mb-3 row mx-0">
<label class="form-control-label col-4 px-0">{{#str}}name, repository{{/str}}</label>
<div class="col-8 d-flex flex-wrap align-items-center"><input class="form-control" type="text"/></div>
</div>
<div class="fp-author mb-3 row mx-0">
<label class="form-control-label col-4 px-0">{{#str}}author, repository{{/str}}</label>
<div class="col-8 d-flex flex-wrap align-items-center"><input class="form-control" type="text"/></div>
</div>
<div class="fp-license mb-3 row mx-0">
{{>core/filemanager_chooselicense}}
</div>
<div class="fp-path mb-3 row mx-0">
<label class="form-control-label col-4 px-0">{{#str}}path, repository{{/str}}</label>
<div class="col-8 d-flex flex-wrap align-items-center pr-0">
<select class="custom-select form-control"></select>
</div>
</div>
<div class="fp-original mb-3 row mx-0">
<div class="form-control-label col-4 px-0">{{#str}}original, repository{{/str}}</div>
<div class="col-8 d-flex flex-wrap align-items-center">
<span class="fp-originloading">{{#pix}}i/loading_small{{/pix}} {{#str}}loading, repository{{/str}}</span><span class="fp-value"></span>
</div>
</div>
<div class="fp-reflist mb-3 row mx-0">
<div class="form-control-label col-4 px-0">{{#str}}referenceslist, repository{{/str}}</div>
<div class="col-8 d-flex flex-wrap align-items-center">
<p class="fp-refcount"></p>
<span class="fp-reflistloading">{{#pix}}i/loading_small{{/pix}} {{#str}}loading, repository{{/str}}</span>
<ul class="fp-value"></ul>
</div>
</div>
<div class="fp-select-buttons mb-3">
<button class="fp-file-update btn-primary btn">{{#str}}update{{/str}}</button>
<button class="fp-file-cancel btn-secondary btn">{{#str}}cancel{{/str}}</button>
</div>
</form>
<div class="fp-info clearfix">
<hr>
<p class="fp-thumbnail"></p>
<div class="fp-fileinfo">
<div class="fp-datemodified">{{#str}}lastmodified, repository{{/str}} <span class="fp-value"></span></div>
<div class="fp-datecreated">{{#str}}datecreated, repository{{/str}} <span class="fp-value"></span></div>
<div class="fp-size">{{#str}}size, repository{{/str}} <span class="fp-value"></span></div>
<div class="fp-dimensions">{{#str}}dimensions, repository{{/str}} <span class="fp-value"></span></div>
</div>
</div>
</div>
@@ -0,0 +1,74 @@
{{!
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/filemanager_licenselinks
This template renders the window with file information/actions.
Example context (json):
{
"licenses":[
{
"fullname":"All rights reserved",
"source":"http:\/\/en.wikipedia.org\/wiki\/All_rights_reserved"
},
{
"fullname":"Public Domain",
"source":"http:\/\/creativecommons.org\/licenses\/publicdomain\/"
},
{
"fullname":"Creative Commons",
"source":"http:\/\/creativecommons.org\/licenses\/by\/3.0\/"
},
{
"fullname":"Creative Commons - NoDerivs",
"source":"http:\/\/creativecommons.org\/licenses\/by-nd\/3.0\/"
},
{
"fullname":"Creative Commons - No Commercial NoDerivs",
"source":"http:\/\/creativecommons.org\/licenses\/by-nc-nd\/3.0\/"
},
{
"fullname":"Creative Commons - No Commercial",
"source":"http:\/\/creativecommons.org\/licenses\/by-nc\/3.0\/"
},
{
"fullname":"Creative Commons - No Commercial ShareAlike",
"source":"http:\/\/creativecommons.org\/licenses\/by-nc-sa\/3.0\/"
},
{
"fullname":"Creative Commons - ShareAlike",
"source":"http:\/\/creativecommons.org\/licenses\/by-sa\/3.0\/"
}
]
}
}}
<p class="mb-1">
{{#str}}chooselicense_help, repository{{/str}}
</p>
<ul>
{{#licenses}}
<li>
<a href="{{source}}" target="_blank">{{fullname}}</a>
</li>
{{/licenses}}
{{^licenses}}
<li>
{{#str}}nolicenses, repository{{/str}}
</li>
{{/licenses}}
</ul>
@@ -0,0 +1,43 @@
{{!
@template core/filemanager_loginform
This template is actually a template which is then used by YUI JS to
generate the markup, so it doesn't make much sense on its own.
Example context (json): {}
}}
<div class="fp-login-form">
<div class="fp-content-center">
<form class="form">
<div class="fp-formset">
<div class="fp-login-popup mb-3">
<div class="fp-popup">
<p class="mdl-align">
<button class="fp-login-popup-but btn-primary btn">{{#str}}login, repository{{/str}}</button>
</p>
</div>
</div>
<div class="fp-login-textarea mb-3">
<textarea class="form-control"></textarea>
</div>
<div class="fp-login-select mb-3">
<label class="form-control-label"></label>
<select class="custom-select"></select>
</div>
<div class="fp-login-input mb-3">
<label class="form-control-label"></label>
<input class="form-control"/>
</div>
<div class="fp-login-radiogroup mb-3">
<label class="form-control-label"></label>
<div class="fp-login-radio"><input class="form-control" /> <label></label></div>
</div>
<div class="fp-login-checkbox mb-3 d-flex flex-wrap align-items-center">
<label class="form-control-label"></label>
<input class="form-control"/>
</div>
</div>
<p class="mdl-align"><button class="fp-login-submit btn-primary btn">{{#str}}submit, repository{{/str}}</button></p>
</form>
</div>
</div>
@@ -0,0 +1,87 @@
{{!
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/filemanager_modal_generallayout
This template renders the general layout (not QuickUpload).
Example context (json):
{}
}}
<div class="container">
<div tabindex="0" class="file-picker fp-generallayout row" role="dialog" aria-live="assertive">
<div class="fp-repo-area col-md-3 pr-2 nav nav-pills flex-column" role="tablist">
<div class="fp-repo nav-item" role="tab" aria-selected="false" tabindex="-1">
<a href="#" class="nav-link" tabindex="-1"><img class="fp-repo-icon" alt=" " width="16" height="16" />&nbsp;<span class="fp-repo-name"></span></a>
</div>
</div>
<div class="col-md-9 p-0">
<div class="fp-repo-items card" tabindex="0">
<div class="fp-navbar bg-faded border-bottom p-2 clearfix icon-no-spacing">
<div>
<div class="fp-toolbar">
<div class="fp-tb-back">
<a href="#" class="btn btn-secondary btn-sm">{{#str}}back, repository{{/str}}</a>
</div>
<div class="fp-tb-search">
<form></form>
</div>
<div class="fp-tb-refresh">
<a title="{{#str}}refresh, repository{{/str}}" class="btn btn-secondary btn-sm" href="#">
{{#pix}}a/refresh{{/pix}}
</a>
</div>
<div class="fp-tb-logout">
<a title="{{#str}}logout, repository{{/str}}" class="btn btn-secondary btn-sm" href="#">
{{#pix}}a/logout{{/pix}}
</a>
</div>
<div class="fp-tb-manage">
<a title="{{#str}}manageurl, repository{{/str}}" class="btn btn-secondary btn-sm" href="#">
{{#pix}}a/setting{{/pix}}
</a>
</div>
<div class="fp-tb-help">
<a title="{{#str}}help, repository{{/str}}" class="btn btn-secondary btn-sm" href="#">
{{#pix}}a/help{{/pix}}
</a>
</div>
<div class="fp-tb-message"></div>
</div>
<div class="fp-viewbar btn-group float-sm-right">
<a role="button" title="{{#str}}displayicons, repository{{/str}}" class="fp-vb-icons btn btn-secondary btn-sm" href="#">
{{#pix}}fp/view_icon_active, theme{{/pix}}
</a>
<a role="button" title="{{#str}}displaydetails, repository{{/str}}" class="fp-vb-details btn btn-secondary btn-sm" href="#">
{{#pix}}fp/view_list_active, theme{{/pix}}
</a>
<a role="button" title="{{#str}}displaytree, repository{{/str}}" class="fp-vb-tree btn btn-secondary btn-sm" href="#">
{{#pix}}fp/view_tree_active, theme{{/pix}}
</a>
</div>
<div class="fp-clear-left"></div>
</div>
<div class="fp-pathbar">
<span class="fp-path-folder"><a class="fp-path-folder-name aalink" href="#"></a></span>
</div>
</div>
<div class="fp-content mb-1"></div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,99 @@
{{!
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/filemanager_page_generallayout
This template renders the html for displaying one file manager
Example context (json):
{
"client_id": "Unique-string",
"restrictions": "<span>Maximum size for new files: Unlimited</span>",
"helpicon": "<a class='btn'><i class='icon fa fa-question-circle'></i></a>"
}
}}
<div id="filemanager-{{{client_id}}}" class="filemanager w-100 fm-loading">
<div class="fp-restrictions">
{{{restrictions}}}
<span class="dnduploadnotsupported-message"> - {{#str}}dndnotsupported_insentence{{/str}}{{{helpicon}}}</span>
</div>
<div class="fp-navbar bg-faded card mb-0">
<div class="filemanager-toolbar icon-no-spacing">
<div class="fp-toolbar">
<div class="fp-btn-add">
<a role="button" title="{{#str}}addfile, repository{{/str}}" class="btn btn-secondary btn-sm" href="#">
{{#pix}}a/add_file{{/pix}}
</a>
</div>
<div class="fp-btn-mkdir">
<a role="button" title="{{#str}}makeafolder{{/str}}" class="btn btn-secondary btn-sm" href="#">
{{#pix}}a/create_folder{{/pix}}
</a>
</div>
<div class="fp-btn-download">
<a role="button" title="{{#str}}download, repository{{/str}}" class="btn btn-secondary btn-sm" href="#">
{{#pix}}a/download_all{{/pix}}
</a>
</div>
<div class="fp-btn-delete">
<a role="button" title="{{#str}}delete{{/str}}" class="btn btn-secondary btn-sm" href="#">
{{#pix}}i/trash{{/pix}}
</a>
</div>
<span class="fp-img-downloading">
<span class="sr-only">{{#str}}loadinghelp{{/str}}</span>
{{#pix}}i/loading_small{{/pix}}
</span>
</div>
<div class="fp-viewbar btn-group float-sm-right">
<a title="{{#str}}displayicons, repository{{/str}}" class="fp-vb-icons btn btn-secondary btn-sm" href="#">
{{#pix}}fp/view_icon_active, theme{{/pix}}
</a>
<a title="{{#str}}displaydetails, repository{{/str}}" class="fp-vb-details btn btn-secondary btn-sm" href="#">
{{#pix}}fp/view_list_active, theme{{/pix}}
</a>
<a title="{{#str}}displaytree, repository{{/str}}" class="fp-vb-tree btn btn-secondary btn-sm" href="#">
{{#pix}}fp/view_tree_active, theme{{/pix}}
</a>
</div>
</div>
<div class="fp-pathbar">
<span class="fp-path-folder"><a class="fp-path-folder-name aalink" href="#"></a></span>
</div>
</div>
<div class="filemanager-loading mdl-align">{{#pix}}i/loading_small{{/pix}}<span class="sr-only">{{#str}}loadinghelp{{/str}}</span></div>
<div class="filemanager-container card" >
<div class="fm-content-wrapper">
<div class="fp-content"></div>
<div class="fm-empty-container">
<div class="dndupload-message">{{#str}}dndenabled_inbox{{/str}}<br/>
<div class="dndupload-arrow d-flex">
<i class="fa fa-arrow-circle-o-down fa-3x m-auto"></i>
</div>
</div>
</div>
<div class="dndupload-target">{{#str}}droptoupload{{/str}}<br/>
<div class="dndupload-arrow d-flex">
<i class="fa fa-arrow-circle-o-down fa-3x m-auto"></i>
</div>
</div>
<div class="dndupload-progressbars"></div>
<div class="dndupload-uploadinprogress">{{#pix}}i/loading_small{{/pix}}<span class="sr-only">{{#str}}loadinghelp{{/str}}</span></div>
</div>
<div class="filemanager-updating">{{#pix}}i/loading_small{{/pix}}<span class="sr-only">{{#str}}loadinghelp{{/str}}</span></div>
</div>
</div>
@@ -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/filemanager_processexistingfile
This template renders the popup dialogue window asking for action when file with the same name already exists.
Example context (json):
{}
}}
<div class="file-picker fp-dlg">
<p class="fp-dlg-text"></p>
<div class="fp-dlg-buttons">
<button class="fp-dlg-butoverwrite btn btn-primary mb-1">{{#str}}overwrite, repository{{/str}}</button>
<button class="fp-dlg-butrename btn btn-primary mb-1"></button>
<button class="fp-dlg-butcancel btn btn-secondary mb-1">{{#str}}cancel{{/str}}</button>
</div>
</div>
@@ -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/filemanager_processexistingfilemultiple
This template renders the popup dialogue window asking for action when file with the same name already exists
* (multiple-file version).
Example context (json):
{}
}}
<div class="file-picker fp-dlg">
<p class="fp-dlg-text"></p>
<a class="fp-dlg-butoverwrite btn btn-primary" href="#">{{#str}}overwrite, repository{{/str}}</a>
<a class="fp-dlg-butrename btn btn-primary" href="#"></a>
<a class="fp-dlg-butcancel btn btn-secondary" href="#">{{#str}}cancel{{/str}}</a>
<br/>
<a class="fp-dlg-butoverwriteall btn btn-primary" href="#">{{#str}}overwriteall, repository{{/str}}</a>
<a class="fp-dlg-butrenameall btn btn-primary" href="#">{{#str}}renameall, repository{{/str}}</a>
</div>
@@ -0,0 +1,89 @@
{{!
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/filemanager_selectlayout
This template renders the window appearing to select a file.
Example context (json):
{}
}}
<div class="file-picker fp-select">
<div class="fp-select-loading">
<span class="sr-only">{{#str}}loadinghelp{{/str}}</span>
{{#pix}}i/loading_small{{/pix}}
</div>
<div class="container">
<form>
<fieldset class="mb-3 row flex-column">
<div class="form-check fp-linktype-2">
<label class="form-check-label">
<input class="form-check-input" type="radio">
{{#str}}makefileinternal, repository{{/str}}
</label>
</div>
<div class="form-check fp-linktype-1">
<label class="form-check-label">
<input class="form-check-input" type="radio">
{{#str}}makefilelink, repository{{/str}}
</label>
</div>
<div class="form-check fp-linktype-4">
<label class="form-check-label">
<input class="form-check-input" type="radio">
{{#str}}makefilereference, repository{{/str}}
</label>
</div>
<div class="form-check fp-linktype-8">
<label class="form-check-label">
<input class="form-check-input" type="radio">
{{#str}}makefilecontrolledlink, repository{{/str}}
</label>
</div>
</fieldset>
<div class="fp-saveas mb-3 row">
<label class="col-form-label">{{#str}}saveas, repository{{/str}}</label>
<input class="form-control" type="text">
</div>
<div class="fp-setauthor mb-3 row">
<label class="col-form-label">{{#str}}author, repository{{/str}}</label>
<input class="form-control" type="text">
</div>
<div class="fp-setlicense mb-3 row">
{{>core/filemanager_chooselicense}}
</div>
<div class="mb-3 row">
<div class="fp-select-buttons">
<button class="fp-select-confirm btn-primary btn">{{#str}}getfile, repository{{/str}}</button>
<button class="fp-select-cancel btn-secondary btn">{{#str}}cancel{{/str}}</button>
</div>
</div>
</form>
</div>
<div class="fp-info clearfix">
<hr>
<p class="fp-thumbnail"></p>
<div class="fp-fileinfo">
<div class="fp-datemodified">{{#str}}lastmodified, repository{{/str}}<span class="fp-value"></span></div>
<div class="fp-datecreated">{{#str}}datecreated, repository{{/str}}<span class="fp-value"></span></div>
<div class="fp-size">{{#str}}size, repository{{/str}}<span class="fp-value"></span></div>
<div class="fp-license">{{#str}}license, repository{{/str}}<span class="fp-value"></span></div>
<div class="fp-author">{{#str}}author, repository{{/str}}<span class="fp-value"></span></div>
<div class="fp-dimensions">{{#str}}dimensions, repository{{/str}}<span class="fp-value" dir="ltr"></span></div>
</div>
</div>
</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/filemanager_uploadform
This template renders the 'Upload file' repository.
Example context (json):
{}
}}
<div class="fp-upload-form">
<div class="fp-content-center">
<form enctype="multipart/form-data" method="POST" class="form">
<div class="fp-formset">
<div class="fp-file mb-3">
<label>{{#str}}attachment, repository{{/str}}</label>
<div class="px-3">
<input type="file"/>
</div>
</div>
<div class="fp-saveas mb-3">
<label>{{#str}}saveas, repository{{/str}}</label>
<input type="text" class="form-control"/>
</div>
<div class="fp-setauthor mb-3">
<label>{{#str}}author, repository{{/str}}</label>
<input type="text" class="form-control"/>
</div>
<div class="fp-setlicense mb-3">
{{>core/filemanager_chooselicense}}
</div>
</div>
</form>
<div class="mdl-align">
<button class="fp-upload-btn btn-primary btn">{{#str}}upload, repository{{/str}}</button>
</div>
</div>
</div>
@@ -0,0 +1,80 @@
{{!
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/form_autocomplete_input
Moodle template for the input field in an autocomplate form element.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* inputId The dom id of this input field.
* suggestionsId The dom id of the suggestions list.
* selectionId The dom id of the current selection list.
* downArrowId The dom id of the down arrow to open the suggestions.
* placeholder The place holder text when the field is empty
Example context (json):
{ "inputID": 1, "suggestionsId": 2, "selectionId": 3, "downArrowId": 4, "placeholder": "Select something" }
}}
{{#showSuggestions}}
<div class="form-autocomplete-input d-md-inline-block mr-md-2 position-relative">
<input type="text"{{!
}} id="{{inputId}}"{{!
}} class="form-control"{{!
}} list="{{suggestionsId}}"{{!
}} placeholder="{{placeholder}}"{{!
}} role="combobox"{{!
}} aria-expanded="false"{{!
}} autocomplete="off"{{!
}} autocorrect="off"{{!
}} autocapitalize="off"{{!
}} aria-autocomplete="list"{{!
}} aria-owns="{{suggestionsId}} {{selectionId}}"{{!
}} {{#tags}}data-tags="1"{{/tags}}{{!
}} {{#multiple}}data-multiple="multiple"{{/multiple}}{{!
}}>
<span class="form-autocomplete-downarrow position-absolute p-1" id="{{downArrowId}}">&#x25BC;</span>
</div>
{{/showSuggestions}}
{{^showSuggestions}}
<div class="form-autocomplete-input d-md-inline-block mr-md-2">
<input type="text"{{!
}} id="{{inputId}}"{{!
}} class="form-control"{{!
}} placeholder="{{placeholder}}"{{!
}} role="textbox"{{!
}} aria-owns="{{selectionId}}"{{!
}} {{#tags}}data-tags="1"{{/tags}}{{!
}} {{#multiple}}data-multiple="multiple"{{/multiple}}{{!
}}>
</div>
{{/showSuggestions}}
{{#js}}
require(['jquery'], function($) {
// Set the minimum width of the input so that the placeholder is whole displayed.
var inputElement = $(document.getElementById('{{inputId}}'));
if (inputElement.length) {
inputElement.css('min-width', inputElement.attr('placeholder').length + 'ch');
}
});
{{/js}}
@@ -0,0 +1,38 @@
{{!
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/form_autocomplete_layout
Moodle template for the layout of autocomplete elements.
Classes required for JS:
* none
Data attributes required for JS:
* data-region="form_autocomplete-input"
* data-region="form_autocomplete-suggestions"
* data-region="form_autocomplete-selection"
Context variables required for this template:
* none
Example context (json):
{}
}}
<div data-region="form_autocomplete-selection"></div>
<div data-region="form_autocomplete-input"></div>
<div data-region="form_autocomplete-suggestions"></div>
@@ -0,0 +1,51 @@
{{!
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/form_autocomplete_selection
Moodle template for the wrapper of currently selected items in an autocomplate form element.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* multiple True if this field allows multiple selections
* selectionId The dom id of the current selection list.
* items List of items with label and value fields (used by the partial).
* noSelectionString String to use when no items are selected (used by the partial).
Example context (json):
{ "multiple": true, "selectionId": 1, "items": [
{ "label": "Item label with <strong>tags</strong>", "value": "5" },
{ "label": "Another item label with <strong>tags</strong>", "value": "4" }
], "noSelectionString": "No selection" }
}}
<span class="sr-only" id="{{selectionId}}-label">{{#str}}selecteditems, form{{/str}}</span>
<div{{!
}} class="form-autocomplete-selection w-100 {{#multiple}}form-autocomplete-multiple{{/multiple}}"{{!
}} id="{{selectionId}}"{{!
}} aria-labelledby="{{selectionId}}-label"{{!
}} role="listbox"{{!
}} aria-atomic="true"{{!
}} tabindex="0"{{!
}} {{#required}}aria-required="true"{{/required}}{{!
}} {{#multiple}}aria-multiselectable="true"{{/multiple}}>
{{> core/form_autocomplete_selection_items }}
</div>
@@ -0,0 +1,47 @@
{{!
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/form_autocomplete_selection_items
Moodle template for the currently selected items in an autocomplate form element.
Classes required for JS:
* none
Data attributes required for JS:
* data-value
Context variables required for this template:
* items List of items with label and value fields.
* - value Value of the selected item.
* - label HTML representing the value.
* noSelectionString String to use when no items are selected
Example context (json):
{ "items": [
{ "label": "Item label with <strong>tags</strong>", "value": "5" },
{ "label": "Another item label with <strong>tags</strong>", "value": "4" }
], "noSelectionString": "No selection" }
}}
{{#items}}
<span role="option" data-value="{{value}}" aria-selected="true" class="badge bg-secondary text-dark m-1" style="font-size: 100%">
<span aria-hidden="true">× </span>{{{label}}}
</span>
{{/items}}
{{^items}}
<span class="m-1 h-5">{{noSelectionString}}</span>
{{/items}}
@@ -0,0 +1,50 @@
{{!
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/form_autocomplete_suggestions
Moodle template for the list of valid options in an autocomplate form element.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* suggestionsId The dom id of the current suggestions list.
* options List of options with label and value fields.
Example context (json):
{ "suggestionsId": 1, "options": [
{ "label": "Item label with <strong>tags</strong>", "value": "5" },
{ "label": "Another item label with <strong>tags</strong>", "value": "4"},
{ "label": "A disabled item", "value": "", "disabled": true}
]}
}}
<ul class="form-autocomplete-suggestions" id="{{suggestionsId}}" role="listbox" aria-label="{{#str}}suggestions, form{{/str}}" aria-hidden="true" tabindex="-1">
{{#options}}
<li
role="option"
data-value="{{value}}"
{{#disabled}}aria-disabled="true"{{/disabled}}
{{#classes}}class="{{{classes}}}"{{/classes}}
>
{{{label}}}
</li>
{{/options}}
</ul>
@@ -0,0 +1,45 @@
{{!
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/form_input_toggle_sensitive
Moodle template for toggling senstive inputs.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* none
Example context (json):
{
"smallscreensonly": true,
"sensitiveinput": "<input type=\"password\" name=\"password\" id=\"password\">"
}
}}
<div class="toggle-sensitive-wrapper {{#smallscreensonly}}small-screens-only{{/smallscreensonly}} input-group mb-3">
{{{sensitiveinput}}}
<div class="input-group-append">
<button class="toggle-sensitive-btn btn btn-secondary" type="button" {{!
!}}aria-label="{{#str}}togglesensitive, form{{/str}}">
{{#pix}}t/hide, core{{/pix}}
</button>
</div>
</div>
+63
View File
@@ -0,0 +1,63 @@
{{!
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/full_header
This template renders the header.
Example context (json):
{
"contextheader": "context_header_html",
"settingsmenu": "settings_html",
"hasnavbar": false,
"navbar": "navbar_if_available",
"courseheader": "course_header_html",
"welcomemessage": "welcomemessage"
}
}}
<header id="page-header" class="header-maxwidth d-print-none">
<div class="w-100">
<div class="d-flex flex-wrap">
{{#hasnavbar}}
<div id="page-navbar">
{{{navbar}}}
</div>
{{/hasnavbar}}
<div class="ml-auto d-flex">
{{{pageheadingbutton}}}
</div>
<div id="course-header">
{{{courseheader}}}
</div>
</div>
<div class="d-flex align-items-center">
{{^welcomemessage}}
{{#contextheader}}
<div class="mr-auto">
{{{contextheader}}}
</div>
{{/contextheader}}
{{/welcomemessage}}
{{> core/welcome }}
<div class="header-actions-container ml-auto" data-region="header-actions-container">
{{#headeractions}}
<div class="header-action ml-2">{{{.}}}</div>
{{/headeractions}}
</div>
</div>
</div>
</header>
+25
View File
@@ -0,0 +1,25 @@
{{!
@template core/help_icon
Help icon.
Example context (json):
{
"title": "Help with something",
"url": "http://example.org/help",
"linktext": "",
"icon":{
"attributes": [
{"name": "class", "value": "iconhelp"},
{"name": "src", "value": "../../../pix/help.svg"},
{"name": "alt", "value": "Help icon"}
]
}
}
}}
<a class="btn btn-link p-0" role="button"
data-container="body" data-toggle="popover"
data-placement="{{#ltr}}right{{/ltr}}{{^ltr}}left{{/ltr}}" data-content="{{text}} {{completedoclink}}"
data-html="true" tabindex="0" data-trigger="focus" aria-label="{{#str}} help {{/str}}">
{{#pix}}help, core, {{{alt}}}{{/pix}}
</a>
+40
View File
@@ -0,0 +1,40 @@
{{!
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/hover_tooltip
Displays a tooltip on hover.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* none
Example context (json):
{
}
}}
<div class="hover-tooltip-container">
{{$anchor}}{{/anchor}}
<div class="hover-tooltip">
{{$tooltip}}{{/tooltip}}
</div>
</div>
@@ -0,0 +1,80 @@
{{!
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/infected_file_email
Moodle template for infected files emails.
Context variables required for this template:
* report - Hyperlink to the report page,
* scanner - Scanning engine that found this file,
* filename - Name of the infected file,
* filesize - Size of the file,
* contenthash - File content hash,
* contenttype - Type of uploaded file,
* author - User that uploaded the file,
* ipaddress - IP address the file was uploaded from,
* geoinfo - Geo information about IP address,
* referer - The referring page,
* identityproviders - List of identiy providers,
* date - Date of upload
* notice - Notice returned from the scanning engine
* additionalinfo - Any additional information from the scanning engine
Example context (json):
{
"header": "Infected file detected",
"report": "http://example.moodle/report/infectedfiles/index.php",
"scanner": "antivirus_clamav",
"filename": "virus.txt",
"filesize": 100,
"contenthash": "3395856ce81f2b7382dee72602f798b642f14140",
"contenttype": "text/plain",
"author": "Example User (exampleuser)",
"ipaddress": "192.168.0.1",
"geoinfo": "Brisbane, Australia",
"referer": "http://example.moodle/user/files.php",
"date": "28/05/20, 11:19",
"notice": "Clamav scanning has tried 1 time(s). ClamAV has failed to run.",
"additionalinfo": "Here is the output from ClamAV: /tmp/phpElIcr2: Not a regular file ERROR"
}
}}
<div>
<b>{{header}}</b>
<div>
<p><b>{{#str}} emailreport, antivirus {{/str}}</b><a href={{report}}>{{report}}</a></p>
<p><b>{{#str}} emailscanner, antivirus {{/str}}</b>{{scanner}}</p>
<br>
<p><b>{{#str}} emailfilename, antivirus {{/str}}</b>{{filename}}</p>
<p><b>{{#str}} emailfilesize, antivirus {{/str}}</b>{{filesize}}</p>
<p><b>{{#str}} emailcontenthash, antivirus {{/str}}</b>{{contenthash}}</p>
<p><b>{{#str}} emailcontenttype, antivirus {{/str}}</b>{{contenttype}}</p>
<p><b>{{#str}} emaildate, antivirus {{/str}}</b>{{date}}</p>
<br>
<p><b>{{#str}} emailauthor, antivirus {{/str}}</b>{{author}}</p>
<p><b>{{#str}} emailipaddress, antivirus {{/str}}</b>{{ipaddress}}</p>
<p><b>{{#str}} emailgeoinfo, antivirus {{/str}}</b>{{geoinfo}}</p>
<p><b>{{#str}} emailreferer, antivirus {{/str}}</b><a href={{referer}}>{{referer}}</a></p>
</div>
<div>
<br>
<pre>{{notice}}</pre>
<br>
<p><b>{{#str}} emailadditionalinfo, antivirus {{/str}} </b></p>
</div>
</div>
+105
View File
@@ -0,0 +1,105 @@
{{!
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/initials_bar
Initials bar.
Example context (json):
{
"title": "First name",
"class": "firstinitial",
"current": "A",
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst",
"all": "All",
"group": [
{
"letter": [
{
"name": "A",
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=A"
},
{
"name": "B",
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=B"
},
{
"name": "C",
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=C"
},
{
"name": "D",
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=D"
}
]
},
{
"letter": [
{
"name": "W",
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=W",
"selected": "W"
},
{
"name": "X",
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=X"
},
{
"name": "Y",
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=Y"
},
{
"name": "Z",
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=Z"
}
]
}
]
}
}}
<div class="initialbar {{class}} d-flex flex-wrap justify-content-center justify-content-md-start">
<span class="initialbarlabel mr-2">{{title}}</span>
<nav class="initialbargroups d-flex flex-wrap justify-content-center justify-content-md-start">
<ul class="pagination pagination-sm">
<li id="{{class}}_page-item_{{all}}" class="initialbarall page-item {{^current}}active{{/current}}">
{{#url}}
<a data-initial="" class="page-link" href="{{url}}"{{^current}} aria-current="true"{{/current}}>{{all}}</a>
{{/url}}
{{#input}}
<input class="page-link mr-1 rounded" {{^current}} aria-current="true"{{/current}} value="{{all}}" type="button">
{{/input}}
</li>
</ul>
{{#group}}
<ul class="pagination pagination-sm">
{{#letter}}
<li id="{{class}}_page-item_{{name}}" data-initial="{{name}}" class="page-item {{name}} {{#selected}}active{{/selected}}">
{{#url}}
<a class="page-link" href="{{url}}"{{#selected}} aria-current="true"{{/selected}}>{{name}}</a>
{{/url}}
{{#input}}
<input class="page-link mr-1 rounded" {{#selected}} aria-current="true"{{/selected}} value="{{name}}" type="button">
{{/input}}
</li>
{{/letter}}
</ul>
{{/group}}
</nav>
</div>
+71
View File
@@ -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/inplace_editable
Displays the value that can be edited inline.
Classes required for JS:
* none
Data attributes required for JS:
* data-inplaceeditable
* data-inplaceeditablelink
* data-component
* data-itemtype
* data-itemid
* data-value
* data-editlabel
* data-type
* data-options
Context variables required for this template:
* none
Example context (json):
{
"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
}
}}
{{#component}}
<span class="inplaceeditable inplaceeditable-{{type}}" data-inplaceeditable="1" data-component="{{component}}" data-itemtype="{{itemtype}}" data-itemid="{{itemid}}"
data-value="{{value}}" data-editlabel="{{editlabel}}" data-type="{{type}}" data-options="{{options}}">
{{^ linkeverything }}{{{displayvalue}}}{{/ linkeverything }}
<a href="#" class="quickeditlink aalink" data-inplaceeditablelink="1" title="{{edithint}}">
{{# linkeverything }}{{{displayvalue}}}{{/ linkeverything }}
<span class="quickediticon visibleifjs icon-size-3">
{{#editicon}}{{#pix}}{{key}}, {{component}}, {{{title}}}{{/pix}}{{/editicon}}
</span>
</a>
</span>
{{#js}}
require(['core/inplace_editable']);
{{/js}}
{{/component}}
{{^component}}
{{{displayvalue}}}
{{/component}}
+36
View File
@@ -0,0 +1,36 @@
{{!
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/loading
Moodle loading template.
The purpose of this template is to render a loading animation.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
*
Example context (json):
{}
}}
<span class="loading-icon icon-no-margin">{{#pix}} i/loading, core, {{#str}} loading {{/str}} {{/pix}}</span>
@@ -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/local/action_menu/subpanel
Action menu link.
Example context (json):
{
"id": "exampleId12345678",
"text": "Example link text",
"subpanelcontent": "Example subpanel content",
"url": "http://example.com",
"attributes": [
{
"name": "data-attribute",
"value": "example"
}
],
"itemicon": {
"key": "t/groups",
"component": "core",
"title": "Example icon title"
},
"instance": 1,
"disabled": false
}
}}
<div
class="dropdown-subpanel position-relative dropright"
id="{{id}}"
>
<a
class="dropdown-item dropdown-toggle {{#disabled}} disabled {{/disabled}}"
href="{{url}}"
data-toggle="dropdown-subpanel"
role="menuitem"
aria-haspopup="true"
tabindex="-1"
aria-expanded="false"
aria-label="{{text}}"
{{#attributes}}
{{name}}="{{value}}"
{{/attributes}}
>
{{#itemicon}}
{{#pix}}{{key}}, {{component}}, {{title}}{{/pix}}
{{/itemicon}}
<span class="menu-action-text" id="actionmenuactionsubpanel-{{instance}}">{{{text}}}</span>
</a>
<div class="dropdown-menu dropdown-subpanel-content" role="menu">
{{{subpanelcontent}}}
</div>
</div>
{{#js}}
require(['core/local/action_menu/subpanel'], function(Module) {
Module.init('#' + '{{id}}');
});
{{/js}}
+85
View File
@@ -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/local/choicelist
Default template for a choicelist object.
Classes required for JS:
* none
Context variables required for this template:
* buttoncontent String - the dropdown trigger button content.
* choices Array - the status options.
Example context (json):
{
"hasoptions": true,
"dialogcontent": "Dialog content",
"options": [
{
"optionid": "option1",
"value": "value1",
"name": "First option",
"description": "First option description",
"hasicon": false,
"first": true,
"optionnumber": 1,
"optionuniqid": "option1uniqid",
"selected": true
},
{
"optionid": "option2",
"value": "value2",
"name": "Second option",
"description": "Second option description",
"icon": {
"extraclasses": "iconhelp",
"attributes": [
{"name": "src", "value": "../../../pix/help.svg"},
{"name": "alt", "value": "Help icon"}
]
},
"hasicon": true,
"optionnumber": 2,
"optionuniqid": "option2uniqid"
},
{
"optionid": "option3",
"value": "value3",
"name": "Third option",
"description": "Third option description",
"icon": {
"extraclasses": "iconhelp",
"attributes": [
{"name": "src", "value": "../../../pix/help.svg"},
{"name": "alt", "value": "Help icon"}
]
},
"hasicon": true,
"disabled": true,
"optionnumber": 3,
"optionuniqid": "option3uniqid"
}
]
}
}}
<div class="d-flex flex-column choicelist p-1" role="listbox">
{{#options}}
{{> core/local/choicelist/option}}
{{/options}}
</div>
@@ -0,0 +1,101 @@
{{!
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/local/choicelist/option
Default template for a choicelist option.
Any mustache can user this template to render options in a custom choicelist wrapper.
Classes required for JS:
* none
Context variables required for this template:
* optionuniqid String - unique option id.
* value String - option value.
* name String - options name.
* optionnumber Number - option number.
Example context (json):
{
"value": "value2",
"name": "Second option",
"description": "Second option description",
"icon": {
"extraclasses": "iconhelp",
"attributes": [
{"name": "src", "value": "../../../pix/help.svg"},
{"name": "alt", "value": "Help icon"}
]
},
"hasicon": true,
"optionnumber": 2,
"optionuniqid": "option2uniqid",
"selected": true
}
}}
<div
class="d-flex flex-row align-items-start p-2 mb-1 {{!
}} position-relative rounded dropdown-item-outline {{!
}} {{#disabled}} dimmed_text {{/disabled}} {{!
}} {{#selected}} border bg-primary-light selected {{/selected}}"
data-optionnumber="{{optionnumber}}"
data-selected="{{selected}}"
data-selected-classes = "border bg-primary-light selected"
>
<div class="option-select-indicator">
<span class="{{^selected}} d-none {{/selected}}" data-for="checkedIcon">
{{#pix}} i/checkedcircle, core, {{#str}} selected, form {{/str}} {{/pix}}
</span>
<span class="{{#selected}} d-none {{/selected}}" data-for="uncheckedIcon">
{{#pix}} i/uncheckedcircle{{/pix}}
</span>
</div>
{{#icon}}
<div class="option-icon">
{{#pix}}{{key}}, {{component}}, {{title}}{{/pix}}
</div>
{{/icon}}
<div class="option-name">
<a
class="stretched-link text-wrap font-weight-bold {{!
}} {{^disabled}} text-dark {{/disabled}} {{!
}} {{#disabled}} disabled {{/disabled}} {{!
}} {{#selected}} selected {{/selected}}"
role="option"
{{#selected}} aria-selected="true" {{/selected}}
{{#description}} aria-describedby="{{optionuniqid}}" {{/description}}
data-value="{{value}}"
{{#hasurl}} href="{{{url}}}" {{/hasurl}}
{{! If there is no url, supose JS will handle it somehow. }}
{{^hasurl}} href="#" {{/hasurl}}
{{#disabled}} tabindex="-1" {{/disabled}}
{{#extras}}
{{attribute}}="{{value}}"
{{/extras}}
>
{{name}}
</a>
{{#description}}
<div
id="{{optionuniqid}}"
class="option-description small text-muted text-wrap">
{{{description}}}
</div>
{{/description}}
</div>
</div>
@@ -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/local/comboboxsearch/resultitem
Template for the individual result item.
Context variables required for this template:
* id - Result item system ID.
* instance - The instance ID of the combo box.
* name - Result item human readable name.
The shorttext pragma can be used to provide a short text for the result item.
This is especially useful when the result item content contains html tags.
Example context (json):
{
"id": 2,
"instance": 25,
"name": "Foo bar"
}
}}
<li
id="result-{{instance}}-{{id}}"
class="w-100 dropdown-item d-flex px-0 align-items-center"
role="option"
{{! aria.js would use the data-short-text attribute if it is provided. }}
data-short-text="{{$shorttext}}{{/shorttext}}"
data-value="{{id}}"
aria-label="{{$arialabel}}{{name}}{{/arialabel}}"
>
{{$content}}
<span class="d-block w-100 px-2 text-truncate">
{{name}}
</span>
{{/content}}
</li>

Some files were not shown because too many files have changed in this diff Show More