MDL-52828 competencies: Breakdown report
[moodle.git] / report / competency / templates / report.mustache
CommitLineData
fde4592c
DW
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 report_competency/report
19
20 Moodle template competency breakdown report.
21
22 Example context (json):
23 { "pushratingstouserplans": false, "usercompetencies": []}
24}}
27737ae6 25<div data-region="competency-breakdown-report" data-courseid="{{course.id}}" data-userid="{{user.id}}" data-moduleid="{{moduleid}}">
c2f55d29
DW
26<div data-region="configurecoursecompetencies">
27{{#pushratingstouserplans}}
28 <p class="alert">
29 {{#str}}coursecompetencyratingsarepushedtouserplans, tool_lp{{/str}}
30 </p>
31{{/pushratingstouserplans}}
32{{^pushratingstouserplans}}
33 <p class="alert alert-info">
34 {{#str}}coursecompetencyratingsarenotpushedtouserplans, tool_lp{{/str}}
35 </p>
36{{/pushratingstouserplans}}
37</div>
21e0dd61 38<div class="row-fluid">
5edb0fbc 39<span class="col-md-6">
85a719e4
JP
40 <table class="table table-bordered">
41 <summary class="accesshide">
42 <p>{{#str}}coursecompetencybreakdownsummary, report_competency{{/str}}</p>
43 </summary>
44 <tr>
45 <th scope="col">
46 <span>{{#str}}competency, report_competency{{/str}}</span>
47 </th>
48 <th scope="col">
49 <span>{{#str}}rating, report_competency{{/str}}</span>
50 </th>
51 </tr>
52 {{#usercompetencies}}
53 <tr>
54 {{#competency}}
55 <td>
56 <a href="#" data-action="competency-dialogue" data-id="{{competency.id}}">
32cf4bcb 57 {{{competency.shortname}}} <em data-id="{{competency.id}}">{{competency.idnumber}}</em>
85a719e4
JP
58 </a>
59 </td>
60 {{/competency}}
96f4d771 61 {{#usercompetencycourse}}
85a719e4
JP
62 <td class="alert {{#proficiency}}alert-success{{/proficiency}}"
63 data-user-competency="true"
64 data-userid="{{user.id}}"
65 data-competencyid="{{competencyid}}"
66 data-courseid="{{course.id}}">
67 {{> report_competency/user_competency_summary}}
68 </td>
96f4d771 69 {{/usercompetencycourse}}
85a719e4
JP
70 </tr>
71 {{/usercompetencies}}
72 </table>
21e0dd61
DW
73</span>
74</div>
e07c2ef6
DW
75</div>
76{{#js}}
77require(['tool_lp/competencydialogue'], function(Compdialogue) {
e912927d 78 Compdialogue.init();
e07c2ef6
DW
79});
80require(['report_competency/grading_popup'], function(Popup) {
81 (new Popup('[data-region=competency-breakdown-report]', '[data-user-competency=true]'));
82});
83{{/js}}