mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-68394 h5pactivity: Implement methods to display recent
activity info.
- Loading branch information
1 parent
efb3d4e
commit 045c3ec
Showing
5 changed files
with
662 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
Oops, something went wrong.