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,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 report_insights/bulk_action_button
Extension of core/single_button to show the label with HTML
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* classes - a list of classes to wrap the form.
* url - the action url to submit to
* params - array of params with name and value attributes
* primary - true if this is a primary action button
* id - id for the element
* tooltip - tooltip text for the button
* disabled - true if this element is disabled
* label - text to show on the button
Example context (json):
{
"url" : "#",
"primary" : true,
"tooltip" : "This is a tooltip",
"label" : "This is a the button text, it can include HTML",
"attributes": [
{
"name": "data-attribute",
"value": "yeah"
}
]
}
}}
<div class="{{classes}}">
{{#params}}
<input type="hidden" name="{{name}}" value="{{value}}">
{{/params}}
<button type="submit" class="btn {{#primary}}btn-primary{{/primary}}{{^primary}}btn-outline-primary{{/primary}}"
id="{{id}}"
title="{{tooltip}}"
{{#disabled}}disabled{{/disabled}}
{{#attributes}} {{name}}="{{value}}" {{/attributes}}>{{{label}}}</button>
</div>
@@ -0,0 +1,42 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template report_insights/bulk_actions
Actions panel at the bottom of the assignment grading UI.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* none
Example context (json):
{
}
}}
<div class="{{^bulkactions}} hidden{{/bulkactions}}">
<div class="insights-bulk-actions btn-group mt-3" role="group">
{{#bulkactions}}
{{> report_insights/bulk_action_button}}
{{/bulkactions}}
</div>
</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 report_insights/insight
Template for a insight.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* none
Example context (json):
{
"sampleimage": "<a href=\"#\">Link</a>",
"sampledescription": "Sample description",
"actions": [
{
"classes": "",
"primary": {
"items": [{"rawhtml": "<p>View details</p>"}]
},
"secondary": {
"items": [{"rawhtml": "<p>Not useful</p>"}]
}
}
]
}
}}
<tr data-prediction-id="{{predictionid}}" class="d-flex">
<td class="insight-checkbox-cell col-1{{^bulkactions}} hidden{{/bulkactions}}">
{{{toggleslave}}}
</td>
<td class="col-8">
{{#sampleimage}}
{{{sampleimage}}}
{{/sampleimage}}
{{{sampledescription}}}
</td>
<td class="col-3{{^actions}} hidden{{/actions}}">
{{#actions}}
{{> core/action_menu}}
{{/actions}}
</td>
</tr>
@@ -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 report_insights/insight_details
Actions panel at the bottom of the assignment grading UI.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* none
Example context (json):
{
"contextid": 123,
"modelid": 321,
"insightname": "Best insight ever",
"timecreated": "Thursday, 5 October 2017, 4:16 PM",
"timerange": "Monday, 4 September 2017, 6:00 PM to Thursday, 5 October 2017, 12:00 AM",
"sampleimage": "<a href=\"#\">Link</a>",
"sampledescription": "Sample description",
"actions": [
{
"classes": "",
"primary": {
"items": [{"rawhtml": "<p>View details</p>"}]
},
"secondary": {
"items": [{"rawhtml": "<p>Not useful</p>"}]
}
}
],
"style": "success",
"outcomeicon": {
"attributes": [
{"name": "src", "value": "https://moodle.org/logo/moodle-logo.svg" }
]
},
"predictiondisplayvalue": "This dev will understand it",
"calculations": [
{
"style": "success",
"outcomeicon": {
"attributes": [
{"name": "src", "value": "https://moodle.org/logo/moodle-logo.svg" }
]
},
"name": "Indicator 1",
"displayvalue": "yes"
}, {
"style": "info",
"name": "Indicator 2",
"displayvalue": "20%"
}, {
"style": "",
"name": "Indicator 2",
"displayvalue": "20%"
}, {
"style": "warning",
"name": "Indicator 2",
"displayvalue": "20%"
}, {
"style": "danger",
"name": "Indicator 2",
"displayvalue": "20%"
}
]
}
}}
<div class="insight-container" data-context-id="{{contextid}}" data-model-id="{{modelid}}">
<h2 class="mb-2">{{insightname}}</h2>
{{{insightdescription}}}
{{> report_insights/bulk_actions }}
<table class="generaltable insights-list mt-3">
{{#showpredictionheading}}
<caption>
{{#str}}prediction, report_insights{{/str}}:
<span class="{{#style}}table-{{style}}{{/style}}">
{{#outcomeicon}}
{{> core/pix_icon}}
{{/outcomeicon}}
{{predictiondisplayvalue}}
</span>
</caption>
{{/showpredictionheading}}
<thead>
<tr class="d-flex">
<th scope="col" class="col-1{{^bulkactions}} hidden{{/bulkactions}}">{{{hiddencheckboxtoggleall}}}</th>
<th scope="col" class="col-8">{{#str}}description{{/str}}</th>
<th scope="col" class="col-3{{^actions}} hidden{{/actions}}">{{#str}}actions{{/str}}</th>
</tr>
</thead>
<tbody>
{{> report_insights/insight}}
</tbody>
</table>
<table class="generaltable prediction-timedetails">
<caption>{{#str}}predictiondetails, report_insights{{/str}}</caption>
<tbody>
<tr>
<th scope="row">{{#str}}timecreated, report_insights{{/str}}</td>
<td>{{timecreated}}</td>
</tr>
{{#timerange}}
<tr>
<th scope="row">{{#str}}timerange, report_insights{{/str}}</td>
<td>{{.}}</td>
</tr>
{{/timerange}}
</tbody>
</table>
<table class="generaltable prediction-calculations">
<caption>{{#str}}indicators, report_insights{{/str}}</caption>
<tbody>
{{#calculations}}
<tr>
<th scope="row" class="{{#style}}table-{{style}}{{/style}}">{{name}}</td>
<td class="{{#style}}table-{{style}}{{/style}}">{{#outcomeicon}}{{> core/pix_icon}}{{/outcomeicon}} {{displayvalue}} {{#outcomehelp}}{{> core/help_icon}}{{/outcomehelp}}</td>
</tr>
{{/calculations}}
</tbody>
</table>
{{#nocalculations}}
{{> core/notification_info}}
{{/nocalculations}}
</div>
@@ -0,0 +1,173 @@
{{!
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 report_insights/insights_list
Template for the insights list.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* none
Example context (json):
{
"contextid": 123,
"modelid": 321,
"insightname": "Best insight ever",
"nostaticmodelnotification": {
"message": "This is just a prediction."
},
"showpredictionheading": "true",
"predictions": [
{
"predictiondisplayvalue": "This dev will understand it",
"style": "success",
"outcomeicon": {
"attributes": [
{"name": "src", "value": "https://moodle.org/logo/moodle-logo.svg" }
]
},
"multiplepredictions": "true",
"insights": [
{
"sampleimage": "<a href=\"#\">Link</a>",
"sampledescription": "Sample description",
"actions": [
{
"classes": "",
"primary": {
"items": [{"rawhtml": "<p>View details</p>"}]
},
"secondary": {
"items": [{"rawhtml": "<p>Not useful</p>"}]
}
}
]
}, {
"sampleimage": "<a href=\"#\">Link</a>",
"sampledescription": "Sample description",
"actions": [
{
"classes": "",
"primary": {
"items": [{"rawhtml": "<p>View details</p>"}]
},
"secondary": {
"items": [{"rawhtml": "<p>Not useful</p>"}]
}
}
]
}
]
}, {
"predictiondisplayvalue": "This dev will not understand it",
"style": "danger",
"outcomeicon": {
"attributes": [
{"name": "src", "value": "https://moodle.org/logo/moodle-logo.svg" }
]
},
"insights": [
{
"sampleimage": "<a href=\"#\">Any renderable</a>",
"sampledescription": "Another sample description"
}
]
}
],
"noinsights": false
}
}}
{{#modelselector}}
<div class="mb-2">
{{> core/single_select}}
</div>
{{/modelselector}}
<div class="insight-container" data-context-id="{{contextid}}" data-model-id="{{modelid}}">
<h3 class="mb-2">{{insightname}}</h3>
{{{insightdescription}}}
{{^noinsights}}
{{#nostaticmodelnotification}}
<div class="mt-2">
{{> core/notification_info}}
</div>
{{/nostaticmodelnotification}}
{{{ pagingbar }}}
{{> report_insights/bulk_actions}}
{{#predictions}}
<table class="generaltable insights-list mt-3">
{{#showpredictionheading}}
<caption>
{{#str}}prediction, report_insights{{/str}}:
<span class="{{#style}}table-{{style}}{{/style}}">
{{#outcomeicon}}
{{> core/pix_icon}}
{{/outcomeicon}}
{{predictiondisplayvalue}}
</span>
</caption>
{{/showpredictionheading}}
<thead>
<tr class="d-flex">
{{#multiplepredictions}}
<th class="col-1{{^bulkactions}} hidden{{/bulkactions}}">
{{{checkboxtoggleall}}}
</th>
{{/multiplepredictions}}
{{^multiplepredictions}}
<th class="col-1{{^bulkactions}} hidden{{/bulkactions}}">
{{/multiplepredictions}}
<th scope="col" class="col-8">{{#str}}description{{/str}}</th>
<th scope="col" class="col-3">{{#str}}actions{{/str}}</th>
</tr>
</thead>
<tbody>
{{#insights}}
{{> report_insights/insight}}
{{/insights}}
</tbody>
</table>
{{/predictions}}
{{#multiplepredictions}}
{{> report_insights/bulk_actions}}
{{/multiplepredictions}}
{{{ pagingbar }}}
{{/noinsights}}
{{#noinsights}}
<div class="mt-2">
{{> core/notification_info}}
</div>
{{/noinsights}}
</div>