2 This file is part of Moodle - http://moodle.org/
4 Moodle is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 Moodle is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 @template tool_lp/evidence_summary
20 Moodle template for the the summary of a single piece of evidence.
22 Classes required for JS:
25 Data attributes required for JS:
28 Context variables required for this template:
29 * actionuser User record from a user_summary_exporter
30 * userdate User formatted date this evidence was created
31 * grade Raw grade value if set
32 * gradename Scale grade item
33 * description Description of the evidence
34 * url Optional url for the evidence
36 Example context (json):
37 { "actionuser": { "id": 1, "fullname": "Legend", "profileimageurlsmall": "https://secure.gravatar.com/avatar/78f83716ad197a25e175fbb747cff1ff?s=35&d=mm" },
38 "userdate": "Tuesday...",
41 "description": "The user competency was manually rated in the plan Personal plan A",
42 "url": "http://moodle.org/",
47 <div class="card well-small evidence" data-region="evidence" data-id="{{id}}">
49 <div class="pull-xs-right">
50 <a href="#" data-action="delete-evidence">{{#pix}}t/delete{{/pix}}</a>
55 {{> tool_lp/user_summary }}
58 <strong><time datetime="{{userdate}}">{{userdate}}</time></strong>
60 <p><span class="badge badge-info">{{gradename}}</span></p>
62 <p>{{description}}</p>
64 <blockquote>{{note}}</blockquote>
67 <p><a href="{{url}}" target="_blank" rel="noreferrer">{{url}}</a></p>
72 require(['tool_lp/evidence_delete'], function(EvidenceDelete) {
73 EvidenceDelete.register('[data-action="delete-evidence"]', '[data-region="evidence"]');