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,96 @@
{{!
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/attempt
This template will render an attempt basic information inside a H5P activity results report.
Variables required for this template:
* timemodified - Full attempts list
* attempt - Full attempts list
* rawscore - Full attempts list
* maxscore - Full attempts list
* duration - Full attempts list
* completionicon - Full attempts list
* successicon - Full attempts list
* reporturl - Full attempts list
Variables optional for this template:
* user - optional user record
* scored - The scored attempt
Example context (json):
{
"id": 11,
"h5pactivityid": 1,
"userid": 3,
"timecreated": 1587655101,
"timemodified": 1587655101,
"attempt": 2,
"rawscore": 6,
"maxscore": 6,
"duration": "2 minutes 10 seconds",
"completion": 1,
"completionicon": "<i class=\"icon fa fa-check-circle fa-fw \" title=\"Attempt completed\" aria-label=\"Attempt completed\"><\/i>",
"success": 1,
"successicon": "<i class=\"icon fa fa-check-circle fa-fw \" title=\"Attempt completed successfully\" aria-label=\"Attempt completed successfully\"><\/i>",
"scaled": 1,
"reporturl": {},
"score": "6 out of 6",
"user": {
"id": "3",
"idnumber": "",
"firstname": "John",
"lastname": "Doe",
"email": "s1@example.com",
"institution": "Moodle HQ",
"department": "Business",
"address": "",
"city": "Barcelona",
"country": "Spain",
"lang": "en",
"picture": "[userpic]",
"fullname": "User Fullname"
}
}
}}
<h2 class="px-0 px-md-3">
{{#user}}
{{{picture}}}
{{#str}}attempt, mod_h5pactivity{{/str}} #{{attempt}}: {{fullname}}
{{/user}}
{{^user}}
{{#str}}attempt, mod_h5pactivity{{/str}} #{{attempt}}
{{/user}}
</h2>
<div class="container-fluid mt-4 mb-5 px-0 px-md-3">
<dl class="row">
<dt class="col-12">{{#str}} startdate, mod_h5pactivity {{/str}}</dt>
<dd class="col-12">{{#userdate}} {{timemodified}}, {{#str}} strftimedatetime, core_langconfig {{/str}} {{/userdate}}</dd>
<dt class="col-12">{{#str}} completion, mod_h5pactivity {{/str}}</dt>
<dd class="col-12">{{{completiontext}}}</dd>
<dt class="col-12 text-truncate">{{#str}} duration, mod_h5pactivity {{/str}}</dt>
<dd class="col-12">{{duration}}</dd>
<dt class="col-12">{{#str}} outcome, mod_h5pactivity {{/str}}</dt>
<dd class="col-12">{{{successtext}}}</dd>
{{#score}}
<dt class="col-12">{{#str}} totalscore, mod_h5pactivity {{/str}}</dt>
<dd class="col-12">{{score}}</dd>
{{/score}}
</dl>
</div>
+145
View File
@@ -0,0 +1,145 @@
{{!
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/attempts
This template will render the report link inside a H5P activity.
Variables required for this template:
* attempts - Full attempts list with:
* timemodified - Attempt timemodified
* attempt - Attempt number
* rawscore - Attempt rawscore
* maxscore - Attempt maxscore
* duration - Attempt duration
* completionicon - Completion icon HTML
* successicon - Success icon HTML
* reporturl - Attempt report URL
Variables optional for this template:
* title - optional selected attempt name
* scored - The scored attempt
Example context (json):
{
"attempts": [
{
"id": 7,
"h5pactivityid": 1,
"userid": 5,
"timecreated": 1587654916,
"timemodified": 1587654916,
"attempt": 1,
"rawscore": 6,
"maxscore": 6,
"duration": "14 seconds",
"durationcompact": "14''",
"completion": 1,
"completionicon": "<i class=\"icon fa fa-check-circle fa-fw \"><\/i>",
"success": 1,
"successicon": "<i class=\"icon fa fa-check-circle fa-fw \"><\/i>",
"scaled": 1,
"reporturl": {},
"score": "6 out of 6"
},
{
"id": 8,
"h5pactivityid": 1,
"userid": 5,
"timecreated": 1587654927,
"timemodified": 1587654927,
"attempt": 2,
"rawscore": 1,
"maxscore": 6,
"duration": "25 seconds",
"durationcompact": "25''",
"completion": 1,
"completionicon": "<i class=\"icon fa fa-check-circle fa-fw \"><\/i>",
"success": 0,
"successicon": "<i class=\"icon fa fa-circle-o fa-fw \"><\/i>",
"scaled": 0,
"reporturl": {},
"score": "1 out of 6"
},
{
"id": 9,
"h5pactivityid": 1,
"userid": 5,
"timecreated": 1587654942,
"timemodified": 1587654942,
"attempt": 3,
"rawscore": 3,
"maxscore": 6,
"duration": "40 seconds",
"durationcompact": "40''",
"completion": 1,
"completionicon": "<i class=\"icon fa fa-check-circle fa-fw \"><\/i>",
"success": 0,
"successicon": "<i class=\"icon fa fa-circle-o fa-fw \"><\/i>",
"scaled": 0,
"reporturl": {},
"score": "3 out of 6"
}
]
}
}}
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">{{#str}} date {{/str}}</th>
<th scope="col">{{#str}} score, mod_h5pactivity {{/str}}</th>
<th scope="col" class="d-none d-md-table-cell">{{#str}} maxscore, mod_h5pactivity {{/str}}</th>
<th scope="col" class="d-none d-sm-table-cell">{{#str}} duration, mod_h5pactivity {{/str}}</th>
<th scope="col" class="d-none d-sm-table-cell" class="text-center">{{#str}} completion, mod_h5pactivity {{/str}}</th>
<th scope="col" class="text-center">{{#str}} success {{/str}}</th>
<th scope="col">{{#str}} report {{/str}}</th>
</tr>
</thead>
<tbody>
{{#attempts}}
<tr>
<th scope="row">{{attempt}}</th>
<td>
<span class="d-none d-lg-inline">
{{#userdate}} {{timemodified}}, {{#str}} strftimedatetime, core_langconfig {{/str}} {{/userdate}}
</span>
<span class="d-inline d-lg-none">
{{#userdate}} {{timemodified}}, {{#str}} strftimedatetimeshort, core_langconfig {{/str}} {{/userdate}}
</span>
</td>
<td>{{rawscore}}<span class="d-inline d-md-none"> / {{maxscore}}</span></td>
<td class="d-none d-md-table-cell">{{maxscore}}</td>
<td class="d-none d-sm-table-cell">
<span class="d-none d-md-inline">{{duration}}</span>
<span class="d-inline d-md-none">{{durationcompact}}</span>
</td>
<td class="text-center d-none d-sm-table-cell">{{{completionicon}}}</td>
<td class="text-center">{{{successicon}}}</td>
<td>
<span class="d-none d-md-inline">
<a href="{{{reporturl}}}">{{#str}} view_report, mod_h5pactivity {{/str}}</a>
</span>
<span class="d-inline d-md-none">
<a href="{{{reporturl}}}">{{#str}} view {{/str}}</a>
</span>
</td>
</tr>
{{/attempts}}
</tbody>
</table>
@@ -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>
@@ -0,0 +1,156 @@
{{!
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/reportattempts
This template will render the report link inside a H5P activity.
Variables required for this template:
* attempts - Full attempts list
Variables optional for this template:
* title - optional selected attempt name
* scored - The scored attempt
* attemptscount - The current number of attempts
Example context (json):
{
"attempts": [
{
"id": 7,
"h5pactivityid": 1,
"userid": 5,
"timecreated": 1587654916,
"timemodified": 1587654916,
"attempt": 1,
"rawscore": 6,
"maxscore": 6,
"duration": "14 seconds",
"durationcompact": "14''",
"completion": 1,
"completionicon": "<i class=\"icon fa fa-check-circle fa-fw \"><\/i>",
"success": 1,
"successicon": "<i class=\"icon fa fa-check-circle fa-fw \"><\/i>",
"scaled": 1,
"reporturl": {},
"score": "6 out of 6"
},
{
"id": 8,
"h5pactivityid": 1,
"userid": 5,
"timecreated": 1587654927,
"timemodified": 1587654927,
"attempt": 2,
"rawscore": 1,
"maxscore": 6,
"duration": "25 seconds",
"durationcompact": "25''",
"completion": 1,
"completionicon": "<i class=\"icon fa fa-check-circle fa-fw \"><\/i>",
"success": 0,
"successicon": "<i class=\"icon fa fa-circle-o fa-fw \"><\/i>",
"scaled": 0,
"reporturl": {},
"score": "1 out of 6"
},
{
"id": 9,
"h5pactivityid": 1,
"userid": 5,
"timecreated": 1587654942,
"timemodified": 1587654942,
"attempt": 3,
"rawscore": 3,
"maxscore": 6,
"duration": "40 seconds",
"durationcompact": "40''",
"completion": 1,
"completionicon": "<i class=\"icon fa fa-check-circle fa-fw \"><\/i>",
"success": 0,
"successicon": "<i class=\"icon fa fa-circle-o fa-fw \"><\/i>",
"scaled": 0,
"reporturl": {},
"score": "3 out of 6"
}
],
"user": {
"id": "5",
"auth": "manual",
"idnumber": "",
"firstname": "Miguel",
"lastname": "Alonso",
"email": "s3@example.com",
"institution": "Moodle HQ",
"department": "Development",
"address": "",
"city": "Barcelona",
"country": "ES",
"lang": "en",
"picture": "[USERPIC]",
"fullname": "Miguel Alonso"
},
"scored": {
"title": "Highest score attempt",
"attempts": [
{
"id": 7,
"h5pactivityid": 1,
"userid": 5,
"timecreated": 1587654916,
"timemodified": 1587654916,
"attempt": 1,
"rawscore": 6,
"maxscore": 6,
"duration": "14 seconds",
"durationcompact": "14''",
"completion": 1,
"completionicon": "<i class=\"icon fa fa-check-circle fa-fw \"><\/i>",
"success": 1,
"successicon": "<i class=\"icon fa fa-check-circle fa-fw \"><\/i>",
"scaled": 1,
"reporturl": {},
"score": "6 out of 6"
}
]
}
}
}}
{{#user}}
<h2 class="mb-4">
{{{picture}}}
{{#title}}{{title}}{{/title}}
{{^title}}{{#str}} attempts, mod_h5pactivity {{/str}}: {{fullname}}{{/title}}
</h2>
{{/user}}
{{#scored}}
<h3>{{title}}</h3>
{{>mod_h5pactivity/attempts}}
{{/scored}}
<h3>{{#str}}all_attempts, mod_h5pactivity{{/str}}</h3>
{{^attemptscount}}
<div class="alert alert-warning">
{{#str}} attempts_none, mod_h5pactivity {{/str}}
</div>
{{/attemptscount}}
{{#attemptscount}}
{{>mod_h5pactivity/attempts}}
{{/attemptscount}}
@@ -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 mod_h5pactivity/reportlink
This template will render the report link inside a H5P activity.
Variables required for this template:
* url - The URL to the report page
* message - The link message
Example context (json):
{
"url": "#",
"message": "View attempts list (3 submitted)"
}
}}
<div class="reportlink mb-3">
<a href="{{{url}}}">{{message}}</a>
</div>
@@ -0,0 +1,85 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template mod_h5pactivity/reportresults
This template will render the report results inside a H5P activity.
Variables required for this template:
* attempts - Full attempts list
Variables optional for this template:
* title - optional selected attempt name
* scored - The scored attempt
Example context (json):
{
"attempt": {
"id": 11,
"h5pactivityid": 1,
"userid": 3,
"timecreated": 1587655101,
"timemodified": 1587655101,
"attempt": 2,
"rawscore": 6,
"maxscore": 6,
"duration": "2 minutes 10 seconds",
"completion": 1,
"completionicon": "<i class=\"icon fa fa-check-circle fa-fw \"><\/i>",
"success": 1,
"successicon": "<i class=\"icon fa fa-check-circle fa-fw \"><\/i>",
"scaled": 1,
"reporturl": {},
"score": "6 out of 6",
"user": {
"id": "3",
"username": "s1",
"idnumber": "",
"firstname": "John",
"lastname": "Doe",
"email": "s1@example.com",
"phone2": "",
"institution": "Moodle HQ",
"department": "Business",
"picture": "[USERPIC]",
"fullname": "John Doe"
}
},
"results": [
{
"timecreated": "1587655101",
"interactiontype": "other",
"description": "Example of some results",
"rawscore": "6",
"maxscore": "6",
"duration": "130",
"completion": "1",
"success": "1",
"optionslabel": "Example result",
"score": "6 out of 6",
"content": "<p>See mod_h5pactivity result template for more examples.</p>"
}
]
}
}}
{{#attempt}}
{{>mod_h5pactivity/attempt}}
{{/attempt}}
{{#results}}
{{>mod_h5pactivity/result}}
{{/results}}
+119
View File
@@ -0,0 +1,119 @@
{{!
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/result
This template will render a result choices inside a H5P activity results report.
Variables required for this template:
* description - Result description text
* score - Score string (for example: 2 out of 4)
Variables optional for this template:
* hasoptions - If an option table must be present
* optionslabel - The right label for available options on this result type
* options - An array of mod_h5pactivity/local/result/options compatible array
* content - Extra content in HTML
* track - Indicate if the result has displayable tracking
Example context (json):
{
"timecreated": "1587655101",
"interactiontype": "choice",
"description": "Example of some results",
"rawscore": "4",
"maxscore": "4",
"duration": "130",
"completion": "1",
"success": "1",
"hasoptions": true,
"optionslabel": "Choice",
"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
}
}
],
"score": "4 out of 4",
"content": "<p>This is an optional extra content in <b>HTML</b>.</p>",
"track": true
}
}}
<div class="container-fluid w-100 my-0 p-0">
<div class="row w-100 py-3 px-1 m-0 p-md-3">
{{>mod_h5pactivity/local/result/header}}
{{{content}}}
{{#hasoptions}}
{{>mod_h5pactivity/local/result/options}}
{{/hasoptions}}
{{^track}}
<div class="alert alert-warning w-100" role="alert">
{{#str}}no_compatible_track, mod_h5pactivity, {{interactiontype}}{{/str}}
</div>
{{/track}}
</div>
</div>
@@ -0,0 +1,58 @@
{{!
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/reviewattempts
This template will render the H5P activity inside a recent activity report.
Variables requirer for this template:
* userpicture - User fullname and picture
* grade - User grade
* userdate - Submission date
Example context (json):
{
"userpicture": "<a href=\"#\"> </a>",
"grade": "30.77 / 100.00",
"userdate": "Wednesday, 27 January 2021, 9:54 AM",
"userurl": "http://localhost/m/stable_master/user/view.php?id=3&course=6",
"fullname": "Lukáš Svoboda"
}
}}
<table class="h5pactivity-recent">
<tbody>
<tr>
<td class="userpicture">{{{userpicture}}}</td>
<td>
<div class="title">
{{#modinfo}}
{{modicon}}<a href="{{modurl}}">{{modname}}</a>
{{/modinfo}}
</div>
{{#grade}}
<div class="grade">
{{grade}}
</div>
{{/grade}}
<div class="user">
<a href="{{userurl}}">{{fullname}}</a> - {{#userdate}} {{submissiontimestamp}}, {{#str}} strftimedatetime {{/str}} {{/userdate}}
</div>
</td>
</tr>
</tbody>
</table>