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 User evidence list page.
20 Data attributes required for JS:
21 * data-action = user-evidence-delete
22 * data-region = user-evidence-list
23 * data-region = user-evidence-node
24 * data-id = user evidence ID
25 * data-userid = user evidence user ID
27 Context variables required for this template:
28 * userid - The ID of the user whose page we're viewing
29 * canmanage - Whether the current user can manage the evidence
30 * evidence - The list of evidence
31 * navigation - Buttons to add to the page
32 * pluginbaseurl - The plugin base URL
35 <div data-region="user-evidence-list">
36 <div class="float-left">
41 <table class="generaltable fullwidth">
42 <caption>{{#str}}listofevidence, tool_lp{{/str}}</caption>
45 <th scope="col" width="20%">{{#str}}userevidencename, tool_lp{{/str}}</th>
46 <th scope="col">{{#str}}userevidencesummary, tool_lp{{/str}}</th>
47 <th scope="col">{{#str}}linkedcompetencies, tool_lp{{/str}} ({{#str}}status, tool_lp{{/str}} / {{#str}}reviewer, tool_lp{{/str}})</th>
49 <th scope="col">{{#str}}actions, tool_lp{{/str}}</th>
55 <tr data-region='user-evidence-node' data-id="{{id}}" data-userid="{{userid}}">
56 <td><a href="{{pluginbaseurl}}/user_evidence.php?id={{id}}">{{{name}}}</a></td>
62 <ul class="user-evidence-documents">
64 <li>{{#pix}}url, tool_lp{{/pix}} <a href="{{url}}" title="{{url}}">{{urlshort}}</a></li>
67 <li>{{#pix}}{{icon}}{{/pix}} <a href="{{url}}" title="{{filename}}">{{filenameshort}}</a></li>
77 <ul class="user-evidence-competencies">
80 {{{competency.shortname}}} <small><em>{{competency.idnumber}}</em></small> ({{usercompetency.statusname}}{{#usercompetency.reviewer.fullname}} / {{usercompetency.reviewer.fullname}}{{/usercompetency.reviewer.fullname}})
88 <div style="display: inline-block;">
89 <ul title="{{#str}}edit{{/str}}" class="user-evidence-actions">
91 <a href="#">{{#str}}edit{{/str}}</a><b class="caret"></b>
92 <ul class="dropdown dropdown-menu">
93 <li class="dropdown-item">
94 <a href="{{pluginbaseurl}}/user_evidence_edit.php?id={{id}}&userid={{userid}}&return=list">
95 {{#pix}}t/edit{{/pix}} {{#str}}editthisuserevidence, tool_lp{{/str}}
99 <li class="dropdown-item">
100 <a href="#" data-action="link-competency">
101 {{#pix}}t/add{{/pix}} {{#str}}linkcompetencies, tool_lp{{/str}}
105 <li class="dropdown-item">
106 <a data-action="send-competencies-review" href="#">
107 {{#pix}}t/edit{{/pix}} {{#str}}sendcompetenciestoreview, tool_lp{{/str}}
110 <li class="dropdown-item">
111 <a data-action="user-evidence-delete" href="#">
112 {{#pix}}t/delete{{/pix}} {{#str}}deletethisuserevidence, tool_lp{{/str}}
126 <p class="alert alert-info">{{#str}}nouserevidence, tool_lp{{/str}}</p>
132 require(['tool_lp/user_evidence_actions'], function(UserEvidenceActions) {
133 var uea = new UserEvidenceActions('list');
134 uea.enhanceMenubar('.user-evidence-actions');