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,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 gradereport_user/action_bar
Actions bar for the grade user report.
Context variables required for this template:
* generalnavselector - The data object containing the required properties to render the general navigation selector.
* groupselector - (optional) HTML that outputs the group selector
* userselector - (optional) The data object containing the required properties to render the user selector
* viewasselector - (optional) HTML that outputs the 'view report as' selector
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
}
]
}
}
]
},
"groupselector": "<div class='group-selector'></div>",
"userselector": {
"content": "<div class='user-selector'></div>",
"courseid": 25
},
"viewasselector": "<div class='view-user-selector'></div>"
}
}}
<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}}
{{#groupselector}}
<div class="navitem">
{{{groupselector}}}
</div>
<div class="navitem-divider"></div>
{{/groupselector}}
{{#userselector}}
<span class="d-none" data-region="courseid" data-courseid="{{courseid}}" aria-hidden="true"></span>
<div class="navitem flex-column">
{{#content}}
{{{.}}}
{{/content}}
</div>
<div class="navitem-divider"></div>
{{/userselector}}
<div class="d-flex ml-sm-auto">
{{#viewasselector}}
<div class="navitem-divider"></div>
<div class="navitem">
{{{viewasselector}}}
</div>
<div class="navitem-divider"></div>
{{/viewasselector}}
</div>
</div>
</div>
@@ -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 gradereport_user/all_users_item
Search result line items.
Example context (json):
{
"id": "0",
"name": "All users(10)",
"url": "http://foo.bar/gradereport/?userid=0&id=2"
}
}}
<a id="item-{{id}}" href="{{url}}" class="dropdown-item d-flex px-2 py-1">
<span class="pull-left result-cell text-truncate mr-2">
{{name}}
</span>
</a>
@@ -0,0 +1,61 @@
{{!
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 gradereport_user/user_navigation
The previous/next user navigation for the user report view.
Context variables required for this template:
* previoususer - (optional) The object containing information about the previous user.
* name - The name of the previous user.
* url - The URL to the previous user report.
* nextuser - (optional) The object containing information about the next user.
* name - The name of the next user.
* url - The URL to the next user report.
Example context (json):
{
"previoususer": {
"name": "John Smith",
"url": "https://example.com/grade/report/user/index.php?id=2&userid=3"
},
"previoususer": {
"name": "Jane Doe",
"url": "https://example.com/grade/report/user/index.php?id=2&userid=5"
}
}
}}
<div class="user-navigation w-100">
<div class="container w-100 d-flex">
{{#previoususer}}
<div class="previous d-flex">
<a href="{{url}}" aria-label="{{#str}} gotopreviousreport, gradereport_user {{/str}}">
<i class="fa fa-caret-{{previousarrow}} fa-lg pr-1"></i>
{{name}}
</a>
</div>
{{/previoususer}}
{{#nextuser}}
<div class="next d-flex ml-auto">
<a href="{{url}}" aria-label="{{#str}} gotonextreport, gradereport_user {{/str}}">
{{name}}
<i class="fa fa-caret-{{nextarrow}} fa-lg pl-1"></i>
</a>
</div>
{{/nextuser}}
</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 gradereport_user/user_report_category_content
Template for the content of a category cell in the user report table.
Context variables required for this template:
* categoryid - The grade category ID
* categoryname - The grade category name
Example context (json):
{
"categoryid": "2",
"categoryname": "Grade category 1"
}
}}
<div class="d-flex category-content">
<a aria-expanded="true" role="button" data-categoryid={{categoryid}} data-target=".cat_{{categoryid}}[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-{{arrow}} fa-fw" title="{{#str}} expand, core {{/str}}" role="img" aria-label="{{#str}} expand, core {{/str}}"></i>
</span>
</a>
<span>{{{categoryname}}}</span>
</div>
@@ -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 gradereport_user/view_mode_selector
The view mode selector.
Context variables required for this template:
* name - name of the form element
* value - value of the form element
* baseid - id of the dropdown element and to be used to generate id for other elements used internally
* label - Element label
* labelattributes - Label attributes.
* selectedoption - Text of the selected option
* options - Array of options for the select with value, name, selected, isgroup and id properites.
Example context (json):
{
"name": "menuname",
"value": "opt2",
"baseid": "select-menu56789",
"label": "View report as",
"labelattributes": [],
"selectedoption": "Myself",
"options": [
{
"name": "User",
"value": "opt1",
"id": "select-menu-option1",
"selected": false
},
{
"name": "Myself",
"value": "opt2",
"id": "select-menu-option2",
"selected": true
}
]
}
}}
<div class="view-user-selector">
{{>core/select_menu}}
</div>
{{#js}}
document.querySelector('#{{baseid}}').addEventListener('change', function(e) {
window.location.href = e.target.value;
});
{{/js}}
@@ -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 gradereport_user/zero_state
The zero state of the user report that contains the image and trigger for the search widget.
Example context (json):
{
"imglink": "http://foo.bar/gradereport/?userid=25"
}
}}
<div class="zero-state mx-auto w-50 text-center my-6">
<img src="{{imglink}}" alt="{{#str}}userreports, gradereport_user{{/str}}" aria-hidden="true" class="my-5">
<h3>{{#str}}userreports, gradereport_user{{/str}}</h3>
<p>{{#str}}userreportdesc, gradereport_user{{/str}}</p>
</div>