{{! 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 . }} {{! @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>", "success": 1, "successicon": "<\/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>", "success": 0, "successicon": "<\/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>", "success": 0, "successicon": "<\/i>", "scaled": 0, "reporturl": {}, "score": "3 out of 6" } ] } }} {{#attempts}} {{/attempts}}
# {{#str}} date {{/str}} {{#str}} score, mod_h5pactivity {{/str}} {{#str}} maxscore, mod_h5pactivity {{/str}} {{#str}} duration, mod_h5pactivity {{/str}} {{#str}} completion, mod_h5pactivity {{/str}} {{#str}} success {{/str}} {{#str}} report {{/str}}
{{attempt}} {{#userdate}} {{timemodified}}, {{#str}} strftimedatetime, core_langconfig {{/str}} {{/userdate}} {{#userdate}} {{timemodified}}, {{#str}} strftimedatetimeshort, core_langconfig {{/str}} {{/userdate}} {{rawscore}} / {{maxscore}} {{maxscore}} {{duration}} {{durationcompact}} {{{completionicon}}} {{{successicon}}} {{#str}} view_report, mod_h5pactivity {{/str}} {{#str}} view {{/str}}