first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
@@ -0,0 +1,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_grades/bulkactions/edit/tree/bulk_move_category_item
Recursively renders a grade category tree for the bulk move modal.
Context variables required for this template:
* id - The id of the category.
* name - The name of the category.
* children - An array of child categories.
* iscategory - Whether the item is a category or not.
* haschildcategories - Whether the item has child categories or not.
Example context (json):
{
"id": 1,
"name": "Category 1",
"children": [
{
"id": 2,
"name": "Category 2",
"children": [
{
"id": 3,
"name": "Category 3",
"children": [
{
"id": 4,
"name": "Category 4",
"children": [],
"iscategory": true
}
],
"iscategory": true,
"haschildcategories": true
}
],
"iscategory": true,
"haschildcategories": true
}
],
"iscategory": true,
"haschildcategories": true
}
}}
{{#haschildcategories}}
<li data-for="sectionnode" role="treeitem" aria-owns="movemodalcollapse{{id}}" data-type="category" data-id="{{id}}" data-selected="false" aria-expanded="true" data-collapsible="true">
<div class="collapse-list-item d-flex" id="movemodalsection{{id}}">
<a role="button" href="#movemodalcollapse{{id}}" aria-controls="movemodalcollapse{{id}}" class="collapse-list-link btn" tabindex="-1">
<span class="expanded-icon text-nowrap" data-toggle="tooltip" title="{{#str}} collapse, core {{/str}}">
{{#pix}} t/expandedchevron, core, {{#str}} collapse, core {{/str}} {{/pix}}
</span>
<span class="collapsed-icon text-nowrap" data-toggle="tooltip" title="{{#str}} expand, core {{/str}}">
<span class="dir-rtl-hide">{{#pix}} t/collapsedchevron, core, {{#str}} expand, core {{/str}} {{/pix}}</span>
<span class="dir-ltr-hide">{{#pix}} t/collapsedchevron_rtl, core, {{#str}} expand, core {{/str}} {{/pix}}</span>
</span>
</a>
<span class="collapse-list-item-name">{{name}}</span>
</div>
<div id="movemodalcollapse{{id}}" class="collapse-list-item-content">
<ul class="unlist" role="group" aria-labelledby="movemodalsection{{id}}">
{{#children}}
{{#iscategory}}
{{> core_grades/bulkactions/edit/tree/bulk_move_category_item }}
{{/iscategory}}
{{/children}}
</ul>
</div>
</li>
{{/haschildcategories}}
{{^haschildcategories}}
<li data-for="sectionnode" role="treeitem" data-type="category" data-id="{{id}}" data-selected="false">
<div class="collapse-list-item d-flex">
<span class="collapse-list-item-name ml-2">{{name}}</span>
</div>
</li>
{{/haschildcategories}}
@@ -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_grades/bulkactions/edit/tree/bulk_move_grade_tree
Renders the tree of categories and items for the bulk move action.
Context variables required for this template:
* id - The id of the category.
* name - The name of the category.
* children - An array of child categories.
* iscategory - Whether the item is a category or not.
Example context (json):
{
"id": 1,
"name": "Category 1",
"children": [
{
"id": 2,
"name": "Category 2",
"children": [
{
"id": 3,
"name": "Category 3",
"children": [
{
"id": 4,
"name": "Category 4",
"children": [],
"iscategory": true
}
],
"iscategory": true
}
],
"iscategory": true
}
],
"iscategory": true
}
}}
<p data-for="sectionname">{{#str}} moveselectedto, grades {{/str}}</p>
<nav class="collapse-list" id="destination-selector">
<ul class="unlist p-0" role="tree">
{{#iscategory}}
{{> core_grades/bulkactions/edit/tree/bulk_move_category_item }}
{{/iscategory}}
</ul>
</nav>
@@ -0,0 +1,35 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_grades/bulkactions/edit/tree/bulk_move_trigger
Renders the bulk move trigger element in gradebook setup including hidden inputs related to the action.
Context variables required for this template:
* none
Example context (json):
{
}
}}
{{< core/bulkactions/bulk_action_trigger }}
{{$action}}move{{/action}}
{{$title}}{{#str}} move, core {{/str}}{{/title}}
{{$icon}}{{#pix}} i/dragdrop, core {{/pix}}{{/icon}}
{{/ core/bulkactions/bulk_action_trigger }}
<input type="hidden" name="bulkmove" value="0" id="bulkmoveinput">
<input type="hidden" name="moveafter" value="" id="menumoveafter">
@@ -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_grades/category_settings
This template renders action menu for a given cell.
Example context (json):
{
"aggregation": "Natural",
"aggregateonlygraded": 1,
"aggregateoutcomes": 0,
"droplow": 1,
"keephigh": 1,
"calculatedgrade": "calculated grade"
}
}}
<div class="d-flex flex-wrap" role="list">
{{#calculatedgrade}}
<span class="badge rounded-pill bg-light text-dark" role="listitem">
<strong>{{calculatedgrade}}</strong>
</span>
{{/calculatedgrade}}
{{#aggregation}}
<span class="badge rounded-pill bg-light text-dark" role="listitem">
<strong>{{aggregation}}</strong>
</span>
{{/aggregation}}
{{#aggregateonlygraded}}
<span class="badge rounded-pill bg-light text-dark" role="listitem">
<strong>{{#str}}aggregateonlygraded, grades{{/str}}</strong>
</span>
{{/aggregateonlygraded}}
{{#aggregateoutcomes}}
<span class="badge rounded-pill bg-light text-dark" role="listitem">
<strong>{{#str}}aggregateoutcomes, grades{{/str}}</strong>
</span>
{{/aggregateoutcomes}}
{{#droplow}}
<span class="badge rounded-pill bg-light text-dark" role="listitem">
<strong>{{#str}}droplowestvalues, grades, {{droplow}}{{/str}}</strong>
</span>
{{/droplow}}
{{#keephigh}}
<span class="badge rounded-pill bg-light text-dark" role="listitem">
<strong>{{#str}}keephigh, grades{{/str}}</strong>
</span>
{{/keephigh}}
</div>
+93
View File
@@ -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_grades/cellmenu
This template renders action menu for a given cell.
Example context (json):
{
"editurl": "<a class='dropdown-item' aria-label='Edit grade' role='menuitem' href='grade/edit/tree/grade.php?courseid=13&itemid=608&userid=85&gpr_type=report&gpr_plugin=grader&gpr_courseid=13'>Edit grade</a>",
"hideurl": "<a class='dropdown-item' aria-label='Hide' role='menuitem' href='grade/edit/tree/action.php?id=13&sesskey=sMAOMLAAN5&eid=n608u85&gpr_type=report&gpr_plugin=grader&gpr_courseid=13&action=hide'>Hide</a>",
"reporturl0": "<a class='dropdown-item' aria-label='Single view for this user' role='menuitem' href='grade/report/singleview/index.php?id=13&amp;itemid=39&amp;item=user&amp;gpr_type=report&amp;gpr_plugin=grader&amp;gpr_courseid=13'>Single view for this user</a>",
"reporturl1": "<a class='dropdown-item' aria-label='User report' role='menuitem' href='grade/report/user/index.php?userid=39&amp;id=13&amp;gpr_type=report&amp;gpr_plugin=grader&amp;gpr_courseid=13'>User report</a>",
"ascendingurl": "<a class='dropdown-item' aria-label='Ascending' role='menuitem' href='index.php?id=13&amp;sortitemid=email&amp;sort=asc&amp;gpr_type=report&amp;gpr_plugin=grader&amp;gpr_courseid=13'>Ascending</a>",
"descendingurl": "<a class='dropdown-item' aria-label='Descending' role='menuitem' href='index.php?id=13&amp;sortitemid=email&amp;sort=desc&amp;gpr_type=report&amp;gpr_plugin=grader&amp;gpr_courseid=13'>Descending</a>",
"ascendingfirstnameurl": "<a class='dropdown-item' aria-label='Ascending' role='menuitem' href='index.php?id=13&amp;sortitemid=firstname&amp;sort=asc&amp;gpr_type=report&amp;gpr_plugin=grader&amp;gpr_courseid=13'>Ascending</a>",
"descendingfirstnameurl": "<a class='dropdown-item' aria-label='Descending' role='menuitem' href='index.php?id=13&amp;sortitemid=firstname&amp;sort=desc&amp;gpr_type=report&amp;gpr_plugin=grader&amp;gpr_courseid=13'>Descending</a>",
"ascendinglastnameurl": "<a class='dropdown-item' aria-label='Ascending' role='menuitem' href='index.php?id=13&amp;sortitemid=lastname&amp;sort=asc&amp;gpr_type=report&amp;gpr_plugin=grader&amp;gpr_courseid=13'>Ascending</a>",
"descendinglastnameurl": "<a class='dropdown-item' aria-label='Descending' role='menuitem' href='index.php?id=13&amp;sortitemid=lastname&amp;sort=desc&amp;gpr_type=report&amp;gpr_plugin=grader&amp;gpr_courseid=13'>Descending</a>",
"viewfeedbackurl": "<a href='#' class='dropdown-item' aria-label='View feedback' role='menuitem'>View feedback</a>",
"divider1": "true",
"divider2": "true",
"datatype": "item",
"dataid": "123",
"columncollapse": "<a class='dropdown-item' data-hider='hide' aria-label='Collapse' role='menuitem' href='#'>Collapse</a>"
}
}}
<div class="action-menu moodle-actionmenu grader" data-collapse="menu">
<div class="dropdown">
<button class="btn btn-link btn-icon icon-size-3 cellmenubtn"
type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
{{#databoundary}}data-boundary="{{databoundary}}"{{/databoundary}}
{{#datatype}}data-type="{{datatype}}"{{/datatype}}
{{#dataid}}data-id="{{dataid}}"{{/dataid}}>
<i class="icon fa fa-ellipsis-h fa-fw m-0" title="{{#str}} cellactions, gradereport_grader {{/str}}" aria-hidden="true"></i>
<span class="sr-only">{{#str}} cellactions, gradereport_grader {{/str}}</span>
</button>
<div role="menu" class="dropdown-menu">
{{#editurl}}{{{editurl}}}{{/editurl}}
{{#editcalculationurl}}{{{editcalculationurl}}}{{/editcalculationurl}}
{{#reporturl0}}{{{reporturl0}}}{{/reporturl0}}
{{#reporturl1}}{{{reporturl1}}}{{/reporturl1}}
{{#advancedgradingurl}}{{{advancedgradingurl}}}{{/advancedgradingurl}}
{{#gradesonlyurl}}{{{gradesonlyurl}}}{{/gradesonlyurl}}
{{#aggregatesonlyurl}}{{{aggregatesonlyurl}}}{{/aggregatesonlyurl}}
{{#fullmodeurl}}{{{fullmodeurl}}}{{/fullmodeurl}}
{{#deleteurl}}{{{deleteurl}}}{{/deleteurl}}
{{#duplicateurl}}{{{duplicateurl}}}{{/duplicateurl}}
{{#gradeanalysisurl}}{{{gradeanalysisurl}}}{{/gradeanalysisurl}}
{{#divider1}}
<div class="dropdown-divider" role="separator"></div>
{{/divider1}}
{{#ascendingfirstnameurl}}
<div role="group" aria-label="{{#str}} sortbyfirstname, core_grades {{/str}}">
<div class="h6 dropdown-header">{{#str}} firstname, moodle {{/str}}</div>
{{{ascendingfirstnameurl}}}
{{{descendingfirstnameurl}}}
</div>
<div role="group" aria-label="{{#str}} sortbylastname, core_grades {{/str}}">
<div class="h6 dropdown-header">{{#str}} lastname, moodle {{/str}}</div>
{{{ascendinglastnameurl}}}
{{{descendinglastnameurl}}}
</div>
{{/ascendingfirstnameurl}}
{{#ascendingurl}}
{{{ascendingurl}}}
{{{descendingurl}}}
{{/ascendingurl}}
{{#divider2}}
<div class="dropdown-divider" role="separator"></div>
{{/divider2}}
{{#hideurl}}{{{hideurl}}}{{/hideurl}}
{{#lockurl}}{{{lockurl}}}{{/lockurl}}
{{#columncollapse}}{{{columncollapse}}}{{/columncollapse}}
{{#resetweightsurl}}{{{resetweightsurl}}}{{/resetweightsurl}}
{{#viewfeedbackurl}}{{{viewfeedbackurl}}}{{/viewfeedbackurl}}
</div>
</div>
</div>
@@ -0,0 +1,90 @@
{{!
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_grades/course_outcomes_action_bar
Actions bar for the gradebook course outcomes page.
Context variables required for this template:
* generalnavselector - The data object containing the required properties to render the general navigation selector.
* manageoutcomesbutton - The data object containing the required properties to render the 'manage outcomes' button.
Example context (json):
{
"generalnavselector": {
"name": "Gradebook tertiary navigation selector",
"value": "opt2",
"baseid": "select-menu56789",
"selectedoption": "Outcomes",
"options": [
{
"selected": false,
"isgroup": {
"name": "View",
"id": "select-menu-group1",
"options": [
{
"name": "Grader report",
"value": "opt1",
"id": "select-menu-option1",
"selected": false
}
]
}
},
{
"selected": false,
"isgroup": {
"name": "More",
"id": "select-menu-group2",
"options": [
{
"name": "Outcomes",
"value": "opt2",
"id": "select-menu-option2",
"selected": true
}
]
}
}
]
},
"manageoutcomesbutton": {
"id": "single_button12345",
"method" : "get",
"classes": "singlebutton",
"formid": null,
"url" : "#",
"primary" : true,
"tooltip" : null,
"label" : "Manage outcomes",
"attributes": []
}
}
}}
<div class="container-fluid tertiary-navigation full-width-bottom-border">
<div class="row">
{{#generalnavselector}}
<div class="navitem">
{{>core/tertiary_navigation_selector}}
</div>
<div class="navitem-divider"></div>
{{/generalnavselector}}
{{#manageoutcomesbutton}}
<div class="navitem">
{{>core/single_button}}
</div>
{{/manageoutcomesbutton}}
</div>
</div>
+53
View File
@@ -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_grades/edit_tree
Edit tree template.
Context variables required for this template:
* actionurl - string - Form action URL.
* sesskey - string - The session key.
* notification - object - Context data for the notification.
* table - string - HTML content of the grade items table.
* movingmodeenabled - string - Whether moving mode is enabled.
* courseid - int - The course id.
* stickyfooter - string - HTML content of the sticky footer.
Example context (json):
{
"actionurl": "#",
"sesskey": "fakesesskey",
"notification": "",
"table": "<table class='generaltable simple setup-grades' id='grade_edit_tree_table'><thead> <tr><th>Name</th><th>Weights</th><th>Max grade</th><th>Actions</th> </tr></thead><tbody></tbody></table>",
"movingmodeenabled": "false",
"courseid": 1,
"stickyfooter": "<div id='gradetreesubmit'></div>"
}
}}
{{#notification}}
{{>core/notification_info}}
{{/notification}}
<div class="gradetree-wrapper d-none">
<form id="gradetreeform" method="post" action="{{actionurl}}" >
<div class="position-relative">
<input type="hidden" name="sesskey" value="{{sesskey}}">
{{{table}}}
{{{stickyfooter}}}
</div>
</form>
</div>
@@ -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_grades/edit_tree_sticky_footer
Edit tree sticky footer template.
Context variables required for this template:
* movingmodeenabled - string - Whether moving mode is enabled.
* courseid - int - The course id.
Example context (json):
{
"movingmodeenabled": "false",
"courseid": 1
}
}}
<div class="col-auto">
{{#movingmodeenabled}}
<a class="btn btn-secondary" href="index.php?id={{courseid}}">
{{#cleanstr}}cancel{{/cleanstr}}
</a>
{{/movingmodeenabled}}
{{^movingmodeenabled}}
<input class="advanced btn btn-primary" type="submit" value="{{#cleanstr}}savechanges{{/cleanstr}}">
{{/movingmodeenabled}}
</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_grades/export_action_bar
Actions bar for the gradebook export pages.
Context variables required for this template:
* generalnavselector - The data object containing the required properties to render the general navigation selector.
* exportselector - The data object containing the required properties to render the export options selector.
Example context (json):
{
"generalnavselector": {
"name": "Gradebook tertiary navigation selector",
"value": "opt2",
"baseid": "select-menu56788",
"selectedoption": "Export",
"options": [
{
"selected": false,
"isgroup": {
"name": "View",
"id": "select-menu-group1",
"options": [
{
"name": "Grader report",
"value": "opt1",
"id": "select-menu-option1",
"selected": false
}
]
}
},
{
"selected": false,
"isgroup": {
"name": "More",
"id": "select-menu-group2",
"options": [
{
"name": "Export",
"value": "opt2",
"id": "select-menu-option2",
"selected": true
}
]
}
}
]
},
"exportselector": {
"name": "exportas",
"value": "https://example.com/grade/export/ods/index.php",
"baseid": "select-menu56789",
"label": "Export as",
"labelattributes": [
{
"name": "class",
"value": "font-weight-bold"
}
],
"selectedoption": "OpenDocument spreadsheet",
"options": [
{
"name": "OpenDocument spreadsheet",
"value": "https://example.com/grade/export/ods/index.php",
"selected": true,
"id": "select-menu-option56789"
}
]
}
}
}}
<div class="container-fluid tertiary-navigation full-width-bottom-border">
<div class="row">
{{#generalnavselector}}
<div class="navitem">
{{>core/tertiary_navigation_selector}}
</div>
<div class="navitem-divider"></div>
{{/generalnavselector}}
{{#exportselector}}
<div class="navitem">
{{>core/select_menu}}
</div>
{{#js}}
document.querySelector('#{{baseid}}').addEventListener('change', function(e) {
window.location.href = e.target.value;
});
{{/js}}
{{/exportselector}}
</div>
</div>
@@ -0,0 +1,122 @@
{{!
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_grades/export_key_manager_action_bar
Actions bar for the gradebook exports key manager page.
Context variables required for this template:
* generalnavselector - The data object containing the required properties to render the general navigation selector.
* exportselector - The data object containing the required properties to render the export options selector.
* adduserkeybutton - The data object containing the required properties to render the 'add user key' button.
Example context (json):
{
"generalnavselector": {
"name": "Gradebook tertiary navigation selector",
"value": "opt2",
"baseid": "select-menu56788",
"selectedoption": "Export",
"options": [
{
"selected": false,
"isgroup": {
"name": "View",
"id": "select-menu-group1",
"options": [
{
"name": "Grader report",
"value": "opt1",
"id": "select-menu-option1",
"selected": false
}
]
}
},
{
"selected": false,
"isgroup": {
"name": "More",
"id": "select-menu-group2",
"options": [
{
"name": "Export",
"value": "opt2",
"id": "select-menu-option2",
"selected": true
}
]
}
}
]
},
"exportselector": {
"name": "exportas",
"value": "https://example.com/grade/export/keymanager.php",
"baseid": "select-menu56789",
"label": "Export as",
"labelattributes": [
{
"name": "class",
"value": "font-weight-bold"
}
],
"selectedoption": "Key manager",
"options": [
{
"name": "Key manager",
"value": "https://example.com/grade/export/keymanager.php",
"selected": true,
"id": "select-menu-option56789"
}
]
},
"adduserkeybutton": {
"id": "single_button12345",
"method" : "get",
"classes": "singlebutton",
"formid": null,
"url" : "#",
"primary" : true,
"tooltip" : null,
"label" : "Add user key",
"attributes": []
}
}
}}
<div class="container-fluid tertiary-navigation full-width-bottom-border">
<div class="row">
{{#generalnavselector}}
<div class="navitem">
{{>core/tertiary_navigation_selector}}
</div>
<div class="navitem-divider"></div>
{{/generalnavselector}}
{{#exportselector}}
<div class="navitem">
{{>core/select_menu}}
</div>
{{#js}}
document.querySelector('#{{baseid}}').addEventListener('change', function(e) {
window.location.href = e.target.value;
});
{{/js}}
{{/exportselector}}
{{#adduserkeybutton}}
<div class="navitem">
{{>core/single_button}}
</div>
{{/adduserkeybutton}}
</div>
</div>
@@ -0,0 +1,46 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_grades/export_publish_action_bar
Actions bar for the gradebook publish export page.
Context variables required for this template:
* backbutton - The data object containing the required properties to render the 'back' button.
Example context (json):
{
"backbutton": {
"id": "single_button12345",
"method" : "get",
"classes": "singlebutton",
"formid": null,
"url" : "#",
"primary" : false,
"tooltip" : null,
"label" : "Back",
"attributes": []
}
}
}}
<div class="container-fluid tertiary-navigation full-width-bottom-border">
<div class="row">
{{#backbutton}}
<div class="navitem">
{{>core/single_button}}
</div>
<div class="navitem-divider"></div>
{{/backbutton}}
</div>
</div>
+64
View File
@@ -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_grades/feedback_modal
The body of the modal displayed when viewing feedback for a grade item.
Context variables required for this template:
* feedbacktext - The full text of the feedback.
* user - Object containing information about the student.
* picture - The image corresponding to the user.
* fullname - The users full name.
* additionalfield - Additional text displayed below the users full name (e.g. the users email address)
Example context (json):
{
"feedbacktext": "<p>Example feedback text</p>",
"user": {
"picture": "<img src=\"http://example.com/pluginfile.php/14/user/icon/boost/f2\" class=\"userpicture\" width=\"40\" alt=\"\">",
"fullname": "John Doe",
"additionalfield": "johndoe@example.com"
}
}
}}
{{#user}}
<div class="d-flex p-3">
<div class="d-block pr-3">
{{#picture}}
{{{picture}}}
{{/picture}}
{{^picture}}
<span class="userinitials"></span>
{{/picture}}
</div>
<div class="d-block">
<span class="p-0 font-weight-bold">
{{fullname}}
</span>
{{#additionalfield}}
<span class="d-block small">
{{additionalfield}}
</span>
{{/additionalfield}}
</div>
</div>
{{/user}}
<div class="box p-3">
{{{feedbacktext}}}
</div>
@@ -0,0 +1,73 @@
{{!
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_grades/general_action_bar
The general actions bar for navigating through the gradebook pages.
Context variables required for this template:
* generalnavselector - The data object containing the required properties to render the general navigation selector.
Example context (json):
{
"generalnavselector": {
"name": "Gradebook tertiary navigation selector",
"value": "opt1",
"baseid": "select-menu56789",
"selectedoption": "Grader report",
"options": [
{
"selected": false,
"isgroup": {
"name": "View",
"id": "select-menu-group1",
"options": [
{
"name": "Grader report",
"value": "opt1",
"id": "select-menu-option1",
"selected": true
}
]
}
},
{
"selected": false,
"isgroup": {
"name": "More",
"id": "select-menu-group2",
"options": [
{
"name": "Import",
"value": "opt2",
"id": "select-menu-option2",
"selected": false
}
]
}
}
]
}
}
}}
<div class="container-fluid tertiary-navigation full-width-bottom-border">
<div class="row">
{{#generalnavselector}}
<div class="navitem">
{{>core/tertiary_navigation_selector}}
</div>
<div class="navitem-divider"></div>
{{/generalnavselector}}
</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_grades/grade_category_visibility_toggle
Template for the grade category visibility toggle element.
Context variables required for this template:
* category - The grade category identifier
Example context (json):
{
"category": "gc2"
}
}}
<a aria-expanded="true" role="button" data-category={{category}} data-target=".{{category}}[data-hidden='false']" class="btn btn-icon mr-1 toggle-category" href="#">
<span class="collapsed text-nowrap" title="{{#str}} collapse, core {{/str}}">
<i class="icon fa fa-chevron-down fa-fw" title="{{#str}} collapse, core {{/str}}" role="img" aria-label="{{#str}} collapse, core {{/str}}"></i>
</span>
<span class="expanded text-nowrap" title="{{#str}} expand, core {{/str}}">
<i class="icon fa fa-chevron-right fa-fw" title="{{#str}} expand, core {{/str}}" role="img" aria-label="{{#str}} expand, core {{/str}}"></i>
</span>
</a>
@@ -0,0 +1,90 @@
{{!
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_grades/grade_letters_action_bar
Actions bar for the grade letters page.
Context variables required for this template:
* generalnavselector - The data object containing the required properties to render the general navigation selector.
* editbutton - The data object containing the required properties to render the 'edit grade letters' button.
Example context (json):
{
"generalnavselector": {
"name": "Gradebook tertiary navigation selector",
"value": "opt2",
"baseid": "select-menu56789",
"selectedoption": "Import",
"options": [
{
"selected": false,
"isgroup": {
"name": "View",
"id": "select-menu-group1",
"options": [
{
"name": "Grader report",
"value": "opt1",
"id": "select-menu-option1",
"selected": false
}
]
}
},
{
"selected": false,
"isgroup": {
"name": "More",
"id": "select-menu-group2",
"options": [
{
"name": "Grade letters",
"value": "opt2",
"id": "select-menu-option2",
"selected": true
}
]
}
}
]
},
"editbutton": {
"id": "single_button12345",
"method" : "get",
"classes": "singlebutton",
"formid": null,
"url" : "#",
"primary" : true,
"tooltip" : null,
"label" : "Edit",
"attributes": []
}
}
}}
<div class="container-fluid tertiary-navigation full-width-bottom-border">
<div class="row">
{{#generalnavselector}}
<div class="navitem">
{{>core/tertiary_navigation_selector}}
</div>
<div class="navitem-divider"></div>
{{/generalnavselector}}
{{#editbutton}}
<div class="navitem">
{{>core/single_button}}
</div>
{{/editbutton}}
</div>
</div>
@@ -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_grades/gradebook_setup_action_bar
Actions bar for the gradebook setup page.
Context variables required for this template:
* generalnavselector - The data object containing the required properties to render the general navigation selector.
* addmenu - The data object containing the required properties to render the 'Add' action menu.
Example context (json):
{
"generalnavselector": {
"name": "Gradebook tertiary navigation selector",
"value": "opt2",
"baseid": "select-menu56789",
"selectedoption": "Gradebook setup",
"options": [
{
"selected": false,
"isgroup": {
"name": "View",
"id": "select-menu-group1",
"options": [
{
"name": "Grader report",
"value": "opt1",
"id": "select-menu-option1",
"selected": false
}
]
}
},
{
"selected": false,
"isgroup": {
"name": "Setup",
"id": "select-menu-group2",
"options": [
{
"name": "Gradebook setup",
"value": "opt2",
"id": "select-menu-option2",
"selected": true
}
]
}
}
]
},
"addmenu": [
{
"classes": "",
"primary": {
"items": [{"rawhtml": "<p>Item in primary menu</p>"}]
},
"secondary": {
"items": [{"rawhtml": "<p>Item in secondary menu</p>"}]
}
}
]
}
}}
<div class="container-fluid tertiary-navigation full-width-bottom-border">
<div class="row">
{{#generalnavselector}}
<div class="navitem">
{{>core/tertiary_navigation_selector}}
</div>
<div class="navitem-divider"></div>
{{/generalnavselector}}
<div class="navitem-divider ml-auto"></div>
<div class="navitem">
{{#addmenu}}
{{>core/action_menu}}
{{/addmenu}}
</div>
<div class="navitem-divider"></div>
</div>
</div>
@@ -0,0 +1,35 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_grades/grades/grader/gradingpanel/point
Point-based grading template for use in the grading panel.
Context variables required for this template:
Example context (json):
{
"grade": 47
}
}}
<form>
<div class="mb-3">
<label for="core_grades-grade-{{uniqid}}">{{#str}}gradenoun, moodle{{/str}}</label>
<input class="form-control" type="number" name="grade" value="{{grade}}" id="core_grades-grade-{{uniqid}}" aria-describedby="core_grades-help-{{uniqid}}">
<small id="core_grades-help-{{uniqid}}" class="form-text text-muted">{{#str}}grade_help, core_grades{{/str}}</small>
</div>
</form>
@@ -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_grades/grades/grader/gradingpanel/point_blank
Point-based grading template for use in the grading panel.
Context variables required for this template:
Example context (json):
{
}
}}
@@ -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_grades/grades/grader/gradingpanel/scale
Scale-based grading template for use in the grading panel.
Context variables required for this template:
Example context (json):
{
"value": 1,
"selected": true,
"title": "Motivational"
}
}}
<form>
<div class="mb-3">
<label for="core_grades-grade-{{uniqid}}">{{#str}}gradenoun, moodle{{/str}}</label>
<select class="form-control" name="grade" id="core_grades-grade-{{uniqid}}" aria-describedby="core_grades-help-{{uniqid}}">
<option value="-1">{{#str}} nograde, moodle{{/str}}</option>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{title}}</option>
{{/options}}
</select>
<small id="core_grades-help-{{uniqid}}" class="form-text text-muted">{{#str}}grade_help, core_grades{{/str}}</small>
</div>
</form>
@@ -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_grades/grades/grader/input
Input template for grader report cell.
Example context (json):
{
"id": "grade_313_624",
"label": "grade_313_624",
"title": "Grade",
"extraclasses": "statusicons",
"value": "Text information",
"tabindex": "1",
"isnumeric": "1",
"minvalue": "0",
"maxvalue": "10",
"name": "grade[313][624]"
}
}}
<label for="{{id}}" class="accesshide">{{{label}}}</label>
<input id="{{id}}" name="{{name}}" type="{{#isnumeric}}number{{/isnumeric}}{{^isnumeric}}text{{/isnumeric}}" value="{{value}}" title="{{title}}" class="{{extraclasses}}" {{!
}} {{#minvalue}}min="{{.}}" {{/minvalue}} {{#maxvalue}}max="{{.}}" {{/maxvalue}} {{#isnumeric}}step="any"{{/isnumeric}}>
@@ -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_grades/grades/grader/scale
Scale template for grader report cell.
Example context (json):
{
"label": "Text label",
"select": "<select><option value='-1'>No outcome</option><option value='1'>Mostly separate knowing</option></select>"
}
}}
{{{label}}}{{{select}}}
@@ -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_grades/grades/grader/text
Text template for grader report cell.
Example context (json):
{
"gradepassicon": "<i class='icon fa fa-times text-danger fa-fw ' title='Fail' role='img' aria-label='Fail'></i>",
"extraclasses": " dimmed_text",
"text": "<span class='gradevalue dimmed_text '>Mostly separate knowing</span>"
}
}}
<div class="header">
{{{gradepassicon}}}
<span class="{{extraclasses}}">{{{text}}}</span>
</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_grades/import_action_bar
Actions bar for the gradebook import pages.
Context variables required for this template:
* generalnavselector - The data object containing the required properties to render the general navigation selector.
* importselector - The data object containing the required properties to render the import options selector.
Example context (json):
{
"generalnavselector": {
"name": "Gradebook tertiary navigation selector",
"value": "opt2",
"baseid": "select-menu56788",
"selectedoption": "Import",
"options": [
{
"selected": false,
"isgroup": {
"name": "View",
"id": "select-menu-group1",
"options": [
{
"name": "Grader report",
"value": "opt1",
"id": "select-menu-option1",
"selected": false
}
]
}
},
{
"selected": false,
"isgroup": {
"name": "More",
"id": "select-menu-group2",
"options": [
{
"name": "Import",
"value": "opt2",
"id": "select-menu-option2",
"selected": true
}
]
}
}
]
},
"importselector": {
"name": "importas",
"value": "https://example.com/grade/import/csv/index.php",
"baseid": "select-menu56789",
"label": "Import as",
"labelattributes": [
{
"name": "class",
"value": "font-weight-bold"
}
],
"selectedoption": "CSV file",
"options": [
{
"name": "CSV file",
"value": "https://example.com/grade/import/csv/index.php",
"selected": true,
"id": "select-menu-option56789"
}
]
}
}
}}
<div class="container-fluid tertiary-navigation full-width-bottom-border">
<div class="row">
{{#generalnavselector}}
<div class="navitem">
{{>core/tertiary_navigation_selector}}
</div>
<div class="navitem-divider"></div>
{{/generalnavselector}}
{{#importselector}}
<div class="navitem">
{{>core/select_menu}}
</div>
{{#js}}
document.querySelector('#{{baseid}}').addEventListener('change', function(e) {
window.location.href = e.target.value;
});
{{/js}}
{{/importselector}}
</div>
</div>
@@ -0,0 +1,122 @@
{{!
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_grades/import_key_manager_action_bar
Actions bar for the gradebook imports key manager page.
Context variables required for this template:
* generalnavselector - The data object containing the required properties to render the tertiary navigation selector.
* importselector - The data object containing the required properties to render the import options selector.
* adduserkeybutton - The data object containing the required properties to render the 'add user key' button.
Example context (json):
{
"generalnavselector": {
"name": "Gradebook tertiary navigation selector",
"value": "opt2",
"baseid": "select-menu56788",
"selectedoption": "Import",
"options": [
{
"selected": false,
"isgroup": {
"name": "View",
"id": "select-menu-group1",
"options": [
{
"name": "Grader report",
"value": "opt1",
"id": "select-menu-option1",
"selected": false
}
]
}
},
{
"selected": false,
"isgroup": {
"name": "More",
"id": "select-menu-group1",
"options": [
{
"name": "Import",
"value": "opt2",
"id": "select-menu-option2",
"selected": true
}
]
}
}
]
},
"importselector": {
"name": "importas",
"value": "https://example.com/grade/import/keymanager.php",
"baseid": "select-menu56789",
"label": "Import as",
"labelattributes": [
{
"name": "class",
"value": "font-weight-bold"
}
],
"selectedoption": "Key manager",
"options": [
{
"name": "Key manager",
"value": "https://example.com/grade/import/keymanager.php",
"selected": true,
"id": "select-menu-option56789"
}
]
},
"adduserkeybutton": {
"id": "single_button12345",
"method" : "get",
"classes": "singlebutton",
"formid": null,
"url" : "#",
"primary" : true,
"tooltip" : null,
"label" : "Add user key",
"attributes": []
}
}
}}
<div class="container-fluid tertiary-navigation full-width-bottom-border">
<div class="row">
{{#generalnavselector}}
<div class="navitem">
{{>core/tertiary_navigation_selector}}
</div>
<div class="navitem-divider"></div>
{{/generalnavselector}}
{{#importselector}}
<div class="navitem">
{{>core/select_menu}}
</div>
{{#js}}
document.querySelector('#{{baseid}}').addEventListener('change', function(e) {
window.location.href = e.target.value;
});
{{/js}}
{{/importselector}}
{{#adduserkeybutton}}
<div class="navitem">
{{>core/single_button}}
</div>
{{/adduserkeybutton}}
</div>
</div>
@@ -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_grades/initials_dropdown_form
The form component of our dropdown within the tertiary navigation.
Context variables required for this template:
* courseid - The course ID.
* initialsbars - The rendered mini renderer from the user renderer.
Example context (json):
{
"courseid": "2",
"initialsbars": "Output from renderer method"
}
}}
<form class="initialsdropdownform" action="#" data-courseid="{{courseid}}">
{{{initialsbars}}}
<div class="d-flex flex-row justify-content-end">
<input class="btn btn-outline-secondary pull-right mx-2" data-action="cancel" type="submit" value="{{#str}}closebuttontitle{{/str}}">
<input class="btn btn-primary pull-right" data-action="save" type="submit" value="{{#str}}apply{{/str}}">
</div>
</form>
@@ -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_grades/manage_outcomes_action_bar
Actions bar for the manage outcomes page.
Context variables required for this template:
* backbutton - The data object containing the required properties to render the 'back' button.
* addoutcomebutton - The data object containing the required properties to render the 'add a new outcome' button.
* importoutcomesbutton - The data object containing the required properties to render the 'import outcomes' button.
* exportoutcomesbutton - The data object containing the required properties to render the 'export outcomes' button.
Example context (json):
{
"backbutton": {
"id": "single_button12345",
"method" : "get",
"classes": "singlebutton",
"formid": null,
"url" : "#",
"primary" : false,
"tooltip" : null,
"label" : "Back",
"attributes": []
},
"addoutcomebutton": {
"id": "single_button13245",
"method" : "get",
"classes": "singlebutton",
"formid": null,
"url" : "#",
"primary" : true,
"tooltip" : null,
"label" : "Add a new outcome",
"attributes": []
},
"importoutcomesbutton": {
"id": "single_button14325",
"method" : "get",
"classes": "singlebutton",
"formid": null,
"url" : "#",
"primary" : false,
"tooltip" : null,
"label" : "Import outcomes",
"attributes": []
},
"exportoutcomesbutton": {
"id": "single_button15245",
"method" : "get",
"classes": "singlebutton",
"formid": null,
"url" : "#",
"primary" : false,
"tooltip" : null,
"label" : "Export all outcomes",
"attributes": []
}
}
}}
<div class="container-fluid tertiary-navigation full-width-bottom-border">
<div class="row">
{{#backbutton}}
<div class="navitem">
{{>core/single_button}}
</div>
<div class="navitem-divider"></div>
{{/backbutton}}
{{#addoutcomebutton}}
<div class="navitem">
{{>core/single_button}}
</div>
{{/addoutcomebutton}}
<div class="ml-auto d-flex">
{{#importoutcomesbutton}}
<div class="navitem">
{{>core/single_button}}
</div>
{{/importoutcomesbutton}}
{{#exportoutcomesbutton}}
<div class="navitem">
{{>core/single_button}}
</div>
{{/exportoutcomesbutton}}
</div>
</div>
</div>
@@ -0,0 +1,90 @@
{{!
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_grades/scales_action_bar
Actions bar for the gradebook scales page.
Context variables required for this template:
* generalnavselector - The data object containing the required properties to render the general navigation selector.
* addnewscalebutton - The data object containing the required properties to render the 'add new scale' button.
Example context (json):
{
"generalnavselector": {
"name": "Gradebook tertiary navigation selector",
"value": "opt2",
"baseid": "select-menu56789",
"selectedoption": "Scales",
"options": [
{
"selected": false,
"isgroup": {
"name": "View",
"id": "select-menu-group1",
"options": [
{
"name": "Grader report",
"value": "opt1",
"id": "select-menu-option1",
"selected": false
}
]
}
},
{
"selected": false,
"isgroup": {
"name": "More",
"id": "select-menu-group2",
"options": [
{
"name": "Scales",
"value": "opt2",
"id": "select-menu-option2",
"selected": true
}
]
}
}
]
},
"addnewscalebutton": {
"id": "single_button12345",
"method" : "get",
"classes": "singlebutton",
"formid": null,
"url" : "#",
"primary" : true,
"tooltip" : null,
"label" : "Manage outcomes",
"attributes": []
}
}
}}
<div class="container-fluid tertiary-navigation full-width-bottom-border">
<div class="row">
{{#generalnavselector}}
<div class="navitem">
{{>core/tertiary_navigation_selector}}
</div>
<div class="navitem-divider"></div>
{{/generalnavselector}}
{{#addnewscalebutton}}
<div class="navitem">
{{>core/single_button}}
</div>
{{/addnewscalebutton}}
</div>
</div>
@@ -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_grades/searchwidget/error
Chooser error template.
Variables required for this template:
* errormessage - The error message
Example context (json):
{
"errormessage": "Error"
}
}}
<div class="p-2 px-sm-5 py-sm-4">
<div class="alert alert-danger" role="alert">
<h5 class="alert-heading">
<i class="fa fa-exclamation-circle fa-fw text-danger"></i>
{{#str}} error, error {{/str}}
</h5>
<hr>
<p class="text-break">{{{errormessage}}}</p>
</div>
</div>
@@ -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_grades/searchwidget/loading
This template renders the loading placeholder for the search widget.
Example context (json):
{}
}}
<div class="d-flex w-100 h-100 justify-content-center align-items-center">
{{> core/loading }}
</div>
+7
View File
@@ -0,0 +1,7 @@
NOTE: Templates inside this directory have been deprecated since Moodle 4.3 and will be removed in 4.7.
They are only retained so that plugins using the now-deprecated searchwidget located in:
'grade/amd/src/searchwidget/basewidget.js'
can continue to use this widget in a working state during the deprecation period.
@@ -0,0 +1,59 @@
{{!
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_grades/searchwidget/searchitem
Search result line items.
Example context (json):
{
"id": "1",
"name": "Quiz 1",
"fullname": "Cameron Greeve"
}
}}
<li
role="option"
class="dropdown-item d-flex px-2 py-1 {{^name}}align-items-center{{/name}}"
{{#name}}id="item-{{id}}"{{/name}}
{{^name}}id="user-{{id}}"{{/name}}
data-value="{{id}}"
>
{{#name}}
<span class="pull-left result-cell text-truncate mr-2">
{{name}}
</span>
{{/name}}
{{^name}}
<div class="d-block pr-2 w-25">
{{#profileimage}}
<img class="userpicture w-75 mx-auto d-block" src="{{profileimage}}" alt="" />
{{/profileimage}}
{{^profileimage}}
<span class="userinitials"></span>
{{/profileimage}}
</div>
<div class="d-block pr-3 w-75">
<span class="w-100 p-0 font-weight-bold">
{{fullname}}
</span>
<span class="w-100 pull-left text-truncate small">
{{email}}
</span>
</div>
{{/name}}
</li>
@@ -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_grades/searchwidget/searchresults
The wrapper in which our search results will be rendered
Example context (json):
{
"searchresults": [
{
"id": "1",
"name": "Quiz 1",
"fullname": "Cameron Greeve",
"sendmessage": "http://foo.bar/message/index.php?id=25",
"addcontact": "http://foo.bar/message/index.php?user1=2&user2=14&addcontact=14&sesskey=XXXXX",
"currentuser": "2"
}
]
}
}}
<div class="searchresultitemscontainer-wrapper dropdown">
<ul class="searchresultitemscontainer d-flex flex-column mw-100 position-relative py-2 list-group rounded-0" role="none" data-region="search-result-items-container">
{{#searchresults}}
{{>core_grades/searchwidget/searchitem}}
{{/searchresults}}
{{^searchresults}}
<p>{{#str}} resultsfound, core, 0 {{/str}}</p>
{{/searchresults}}
</ul>
</div>
+35
View File
@@ -0,0 +1,35 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_grades/status_icons
Template for the grade status icons.
Example context (json):
{
"classes": "gradestatus",
"hidden": true,
"locked": true,
"overridden": false,
"excluded": false,
"feedback": false
}
}}
<div class="text-muted {{classes}}">
{{#hidden}}{{#pix}}i/show, moodle, {{#str}} hidden, grades {{/str}}{{/pix}}{{/hidden}}
{{#locked}}{{#pix}}i/lock, moodle, {{#str}} locked, grades {{/str}}{{/pix}}{{/locked}}
{{#overridden}}{{#pix}}i/overriden_grade, moodle, {{#str}} overridden, grades {{/str}}{{/pix}}{{/overridden}}
{{#excluded}}{{#pix}}i/excluded, moodle, {{#str}} excluded, grades {{/str}}{{/pix}}{{/excluded}}
{{#feedback}}{{#pix}}i/asterisk, moodle, {{#str}} feedbackprovided, grades {{/str}}{{/pix}}{{/feedback}}
</div>
+73
View File
@@ -0,0 +1,73 @@
{{!
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_grades/user_heading
Custom user heading.
Context variables required for this template:
* image - HTML img element representing the avatar of the user.
* userprofileurl - The URL to the user profile page.
* name - The name of the user
* buttons - List of buttons to be displayed in the heading for the user report (e.g. 'message', 'add user to contacts')
Example context (json):
{
"image": "<img src=\"http://example.com/pluginfile.php/14/user/icon/boost/f2\" class=\"userpicture\" width=\"50\" alt=\"\">",
"userprofileurl": "http://example.com/user/view.php?id=6&course=8",
"name": "John Doe",
"buttons": [
{
"linkattributes": [
{
"name": "role",
"value": "button"
},
{
"name": "data-userid",
"value": "3"
}
],
"title": "Message",
"url": "http://example.com/message/index.php?user1=2&user2=3&addcontact=3",
"icon": {
"name": "t/message",
"component": "core"
}
}
]
}
}}
<div class="user-heading d-flex align-items-center">
<div class="d-flex h4">
{{{image}}}
</div>
<div class="d-flex ml-2">
<h2><a class="h4 m-0" href="{{userprofileurl}}">{{name}}</a></h2>
</div>
<div class="d-inline-flex ml-4">
{{#buttons}}
<a {{#linkattributes}} {{name}}="{{value}}" {{/linkattributes}} aria-label="{{title}}" href="{{url}}">
{{#icon}}
<span>
{{#pix}} {{name}}, {{component}}, {{title}} {{/pix}}
</span>
{{/icon}}
</a>
{{/buttons}}
</div>
</div>
+32
View File
@@ -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_grades/weight_field
Weight field.
Example context (json):
{
"itemname": "Awesome test",
"id": "2",
"value": "100"
}
}}
<label class="accesshide" for="weight_{{id}}">
{{#str}}extracreditvalue, grades, {{itemname}}{{/str}}
</label>
<input type="text" name="weight_{{id}}" id="weight_{{id}}" value="{{value}}" size="4" class="form-control">
@@ -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_grades/weight_override_field
Weight override field.
Example context (json):
{
"itemname": "Awesome test",
"id": "2",
"checked": "true",
"value": "100"
}
}}
<div class="d-flex flex-wrap align-items-center">
<label class="accesshide" for="weightoverride_{{id}}">
{{#str}}overrideweightofa, grades, {{itemname}}{{/str}}
</label>
<input type="hidden" name="weightoverride_{{id}}" value="0">
<input type="checkbox" name="weightoverride_{{id}}" id="weightoverride_{{id}}" value="1" class="weightoverride" {{#checked}}checked{{/checked}}>
<label class="accesshide" for="weight_{{id}}">
{{#str}}weightofa, grades, {{itemname}}{{/str}}
</label>
<input type="text" name="weight_{{id}}" id="weight_{{id}}" value="{{value}}" size="4" {{#disabled}}disabled{{/disabled}} class="form-control">
<span style="margin-left:5px">%</span>
<div class="form-control-feedback invalid-feedback ml-3" id="id_error_weight_{{id}}"></div>
</div>