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/course_competency_statistics
23 Classes required for JS:
26 Data attributes required for JS:
29 Context variables required for this template:
31 See competency/classes/external/course_competency_statistics_exporter
33 Example context (json):
36 "canbegradedincourse": true,
37 "canmanagecoursecompetencies": true,
38 "proficientcompetencycount": 3,
39 "proficientcompetencypercentage": 75,
40 "proficientcompetencypercentageformatted": 75.0,
41 "leastproficientcount": 1,
43 { "id": 1, "shortname": "Comp 1", "idnumber": "C1" }
49 Template statistics template.
52 <div data-region="coursecompetencystatistics" class="well">
53 {{#canbegradedincourse}}
54 {{< tool_lp/progress_bar}}
56 {{#str}}xcompetenciesproficientoutofyincourse, tool_lp, { "x": "{{proficientcompetencycount}}", "y": "{{competencycount}}" } {{/str}}
58 {{$percentage}}{{proficientcompetencypercentage}}{{/percentage}}
59 {{$percentlabel}}{{proficientcompetencypercentageformatted}} %{{/percentlabel}}
60 {{/tool_lp/progress_bar}}
61 {{/canbegradedincourse}}
62 {{#canmanagecoursecompetencies}}
63 {{#leastproficientcount}}
66 <p>{{#str}}competenciesmostoftennotproficientincourse, tool_lp{{/str}}</p>
70 <a href="#competency-info-link-{{id}}">
71 <div><p>{{{shortname}}} <em>{{idnumber}}</em></p></div>
76 {{/leastproficientcount}}
77 {{/canmanagecoursecompetencies}}