MDL-64506 templates: Move BS2 btns' to BS4 btns'
[moodle.git] / admin / tool / lp / templates / course_competency_statistics.mustache
CommitLineData
f1979b60
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 tool_lp/course_competency_statistics
19
20 IDs required for JS:
21 * none
22
23 Classes required for JS:
24 * none
25
26 Data attributes required for JS:
27 * none
28
29 Context variables required for this template:
30
72018c0a 31 See competency/classes/external/course_competency_statistics_exporter
f1979b60
DW
32
33 Example context (json):
34 {
f07cb88c 35 "competencycount": 4,
207136f2
DW
36 "canbegradedincourse": true,
37 "canmanagecoursecompetencies": true,
f07cb88c
DP
38 "proficientcompetencycount": 3,
39 "proficientcompetencypercentage": 75,
207136f2
DW
40 "proficientcompetencypercentageformatted": 75.0,
41 "leastproficientcount": 1,
42 "leastproficient": [
43 { "id": 1, "shortname": "Comp 1", "idnumber": "C1" }
44 ]
f1979b60
DW
45 }
46
47}}
48{{!
49 Template statistics template.
50}}
51{{#competencycount}}
29551c4b 52<div data-region="coursecompetencystatistics" class="card">
f1979b60 53 {{#canbegradedincourse}}
9698f2dc
JP
54 {{< tool_lp/progress_bar}}
55 {{$progresstext}}
68f8ad4c 56 {{#str}}xcompetenciesproficientoutofyincourse, tool_lp, { "x": "{{proficientcompetencycount}}", "y": "{{competencycount}}" } {{/str}}
9698f2dc
JP
57 {{/progresstext}}
58 {{$percentage}}{{proficientcompetencypercentage}}{{/percentage}}
59 {{$percentlabel}}{{proficientcompetencypercentageformatted}}&nbsp;%{{/percentlabel}}
60 {{/tool_lp/progress_bar}}
f1979b60
DW
61 {{/canbegradedincourse}}
62 {{#canmanagecoursecompetencies}}
63 {{#leastproficientcount}}
64 <div>
65 <div>
66 <p>{{#str}}competenciesmostoftennotproficientincourse, tool_lp{{/str}}</p>
67 </div>
68 <div>
69 {{#leastproficient}}
70 <a href="#competency-info-link-{{id}}">
32cf4bcb 71 <div><p>{{{shortname}}} <em>{{idnumber}}</em></p></div>
f1979b60
DW
72 </a>
73 {{/leastproficient}}
74 </div>
75 </div>
76 {{/leastproficientcount}}
77 {{/canmanagecoursecompetencies}}
78</div>
79{{/competencycount}}