Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
{{!
2
    This file is part of Moodle - http://moodle.org/
3
 
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.
8
 
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.
13
 
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/>.
16
}}
17
{{!
18
    @template tool_lp/evidence_summary
19
 
20
    Moodle template for the the summary of a single piece of evidence.
21
 
22
    Classes required for JS:
23
    * none
24
 
25
    Data attributes required for JS:
26
    * none
27
 
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
35
 
36
    Example context (json):
37
    { "actionuser": { "id": 1, "fullname": "Legend", "profileimageurlsmall": "https://secure.gravatar.com/avatar/78f83716ad197a25e175fbb747cff1ff?s=35&d=mm" },
38
      "userdate": "Tuesday...",
39
      "grade": 2,
40
      "gradename": "Met",
41
      "description": "The user competency was manually rated in the plan Personal plan A",
42
      "url": "http://moodle.org/",
43
      "candelete": true,
44
      "id": 1
45
    }
46
}}
47
<div class="border p-2 mb-2 evidence" data-region="evidence" data-id="{{id}}">
48
    {{#candelete}}
49
        <div class="float-sm-right">
50
            <a href="#" data-action="delete-evidence">{{#pix}}t/delete{{/pix}}</a>
51
        </div>
52
    {{/candelete}}
53
{{#actionuser}}
54
    <div>
55
        {{> tool_lp/user_summary }}
56
    </div>
57
{{/actionuser}}
58
<strong><time datetime="{{userdate}}">{{userdate}}</time></strong>
59
{{#grade}}
60
    <p><span class="badge bg-info text-white">{{gradename}}</span></p>
61
{{/grade}}
62
<p>{{description}}</p>
63
{{#note}}
64
    <blockquote>{{note}}</blockquote>
65
{{/note}}
66
{{#url}}
67
    <p><a href="{{url}}" target="_blank" rel="noreferrer">{{url}}</a></p>
68
{{/url}}
69
</div>
70
 
71
{{#js}}
72
require(['tool_lp/evidence_delete'], function(EvidenceDelete) {
73
    EvidenceDelete.register('[data-action="delete-evidence"]', '[data-region="evidence"]');
74
});
75
{{/js}}