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,66 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template mod_h5pactivity/local/result/answer
This template render all kind of answers/choice in a results table.
Variables required for this template:
* answer - The answer/choice text
Variables optional for this template:
* pass - The answer pass
* fail - The answer failed
* correct - The answer is correct
* incorrect - The answer is not correct
* text - The choice is just text
* checked - The choice must be checked
* unchecked - The choice must be unchecked
Example context (json):
{
"answer": "This was the ansewer,",
"correct": true,
"incorrect": true,
"text": true,
"checked": true,
"unchecked": true,
"pass": true,
"fail": true
}
}}
{{#correct}}
{{#pix}}i/valid, moodle, {{#str}}answer_correct, mod_h5pactivity{{/str}}{{/pix}}{{answer}}
{{/correct}}
{{#incorrect}}
{{#pix}}i/invalid, moodle, {{#str}}answer_incorrect, mod_h5pactivity{{/str}}{{/pix}}{{answer}}
{{/incorrect}}
{{#text}}
{{answer}}
{{/text}}
{{#checked}}
{{#pix}}i/checkedcircle, moodle, {{#str}}answer_checked, mod_h5pactivity{{/str}}{{/pix}}
{{/checked}}
{{#unchecked}}
{{/unchecked}}
{{#pass}}
{{#pix}}i/valid, moodle, {{#str}}answer_pass, mod_h5pactivity{{/str}}{{/pix}}
{{/pass}}
{{#fail}}
{{#pix}}i/invalid, moodle, {{#str}}answer_fail, mod_h5pactivity{{/str}}{{/pix}}
{{/fail}}
@@ -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 mod_h5pactivity/local/result/header
This template will render a results header inside mod_h5pactivity results report.
Variables required for this template:
* description - Result description
Variables optional for this template:
* success - If the result is marked as success
* score - The result score string
Example context (json):
{
"timecreated": "1587655101",
"interactiontype": "choice",
"description": "Example of some results\n",
"rawscore": "4",
"maxscore": "4",
"duration": "130",
"success": "1",
"score": "4 out of 4"
}
}}
<h3 class="w-100">
{{{description}}}
</h3>
@@ -0,0 +1,118 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template mod_h5pactivity/local/result/options
This template will render a choices table inside a H5P activity results report.
Variables required for this template:
* options - An array of options
* optionslabel - The right label for options column
* correctlabel - The right label for correct answer column
* answerlabel - The right label for the attempt answer column
Example context (json):
{
"optionslabel": "Choice",
"correctlabel": "Correct answer",
"answerlabel": "Attempt answer",
"options": [
{
"description": "Choice 1 text",
"id": 0,
"useranswer": {
"answer": "Correct answer",
"pass": true
},
"correctanswer": {
"answer": "Answer checked",
"checked": true
}
},
{
"description": "Choice 2 text",
"id": 1,
"useranswer": {
"answer": "Wrong answer",
"fail": true
},
"correctanswer": {
"answer": "Answer checked",
"unchecked": true
}
},
{
"description": "Choice 3 text",
"id": 2,
"useranswer": {
"answer": "This was the correct text",
"correct": true
},
"correctanswer": {
"answer": "This was the correct text",
"text": true
}
},
{
"description": "Choice 4 text",
"id": 3,
"correctanswer": {
"answer": "Some text",
"text": true
}
},
{
"description": "Choice 4 text",
"id": 3,
"useranswer": {
"answer": "Some wrong text",
"incorrect": true
}
}
]
}
}}
<table class="table table-striped">
<thead>
<tr>
<th scope="col">{{optionslabel}}</th>
<th scope="col">{{correctlabel}}</th>
<th scope="col">{{answerlabel}}</th>
</tr>
</thead>
<tbody>
{{#options}}
<tr>
<td>{{description}}</td>
<td>{{#correctanswer}}{{>mod_h5pactivity/local/result/answer}}{{/correctanswer}}</td>
<td>{{#useranswer}}{{>mod_h5pactivity/local/result/answer}}{{/useranswer}}</td>
</tr>
{{/options}}
{{#score}}
<tr class="table-light">
<td colspan="2" class="d-none d-sm-table-cell border-top-3 border-dark"></td>
<td class="d-none d-sm-table-cell border-top border-dark">
<strong>{{#str}}score, mod_h5pactivity{{/str}}: {{score}}</strong>
</td>
<td class="d-table-cell d-sm-none text-right border-top border-dark" colspan="3">
<strong>{{#str}}score, mod_h5pactivity{{/str}}: {{score}}</strong>
</td>
</tr>
{{/score}}
</tbody>
</table>