MDL-64506 templates: Move BS2 labels to BS4 badges
[moodle.git] / admin / tool / lp / templates / course_competencies_page.mustache
CommitLineData
d9a39950
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{{!
c0417b04
DW
18 @template tool_lp/course_competencies_page
19
d9a39950 20 Course competencies template.
207136f2
DW
21
22 For a full list of the context for this template see the course_competencies_page renderable.
c0417b04
DW
23
24 This template includes ajax functionality, so it cannot be shown in the template library.
d9a39950
DW
25}}
26<div data-region="coursecompetenciespage">
de3b9193 27 <div data-region="actions" class="clearfix">
207136f2 28 <div class="pull-xs-left">
de3b9193 29 {{#canmanagecoursecompetencies}}
207136f2 30 <button class="btn btn-secondary" disabled>{{#str}}addcoursecompetencies, tool_lp{{/str}}</button>
de3b9193
FM
31 {{/canmanagecoursecompetencies}}
32 </div>
33 </div>
e9b4bca0
JP
34 <div data-region="configurecoursecompetencies">
35 {{#cangradecompetencies}}
36 <p class="alert {{^settings.pushratingstouserplans}}alert-info{{/settings.pushratingstouserplans}}">
37 {{#settings.pushratingstouserplans}}
38 {{#str}}coursecompetencyratingsarepushedtouserplans, tool_lp{{/str}}
39 {{/settings.pushratingstouserplans}}
40 {{^settings.pushratingstouserplans}}
41 {{#str}}coursecompetencyratingsarenotpushedtouserplans, tool_lp{{/str}}
42 {{/settings.pushratingstouserplans}}
43 {{#canconfigurecoursecompetencies}}
44 <a href="#"
45 data-action="configure-course-competency-settings"
46 data-courseid="{{courseid}}"
47 data-pushratingstouserplans="{{settings.pushratingstouserplans}}">
48 {{#pix}}t/edit, core, {{#str}}edit{{/str}}{{/pix}}
49 </a>
50 {{/canconfigurecoursecompetencies}}
51 </p>
52 {{/cangradecompetencies}}
53 </div>
f1979b60
DW
54{{#statistics}}
55{{> tool_lp/course_competency_statistics }}
56{{/statistics}}
d9a39950
DW
57<div data-region="coursecompetencies">
58<table class="generaltable fullwidth managecompetencies">
59<tbody class="drag-parentnode">
60{{#competencies}}
d660824b 61 <tr class="drag-samenode" data-id="{{competency.id}}">
d9a39950 62 <td>
d660824b 63 {{#canmanagecoursecompetencies}}
207136f2
DW
64 <span class="drag-handlecontainer pull-xs-left"></span>
65 <div class="pull-xs-right">
d660824b
FM
66 <a href="#" data-action="delete-competency-link" data-id="{{competency.id}}">
67 {{#pix}}t/delete, core, {{#str}}delete{{/str}}{{/pix}}
68 </a>
69 </div>
207136f2 70 <div class="clearfix"></div>
d660824b
FM
71 {{/canmanagecoursecompetencies}}
72 {{#competency}}
c0417b04 73 <a href="{{pluginbaseurl}}/user_competency_in_course.php?courseid={{courseid}}&competencyid={{competency.id}}&userid={{gradableuserid}}"
f1979b60 74 id="competency-info-link-{{competency.id}}"
32480510 75 title="{{#str}}viewdetails, tool_lp{{/str}}">
32cf4bcb 76 <p><strong>{{{competency.shortname}}} <em>{{competency.idnumber}}</em></strong></p>
32480510
DW
77 </a>
78 <p>{{{competency.description}}}</p>
d660824b 79 {{/competency}}
8c9cb5ec 80 {{#comppath}}
207136f2 81 <span class="pull-xs-left">{{#str}}path, tool_lp{{/str}}&nbsp;</span>{{> tool_lp/competency_path }}
8c9cb5ec 82 {{/comppath}}
96f4d771 83 {{#usercompetencycourse}}
f1947614 84 {{#grade}}
3f2c68f1 85 <span class="badge {{^proficiency}}badge-danger{{/proficiency}}">{{gradename}}</span>
f1947614 86 {{/grade}}
96f4d771 87 {{/usercompetencycourse}}
d660824b
FM
88 {{#canmanagecoursecompetencies}}
89 <div data-region="coursecompetency-ruleoutcome">
90 <label>
91 {{#str}}uponcoursecompletion, tool_lp{{/str}}
7b02521c 92 <select data-field="ruleoutcome" data-id="{{coursecompetency.id}}" class="custom-select">
d660824b
FM
93 {{#ruleoutcomeoptions}}
94 <option value="{{value}}" {{#selected}}selected{{/selected}}>{{text}}</option>
95 {{/ruleoutcomeoptions}}
96 </select>
97 </label>
98 </div>
99 {{/canmanagecoursecompetencies}}
db650737 100 <div data-region="coursecompetencyactivities">
f1947614 101 <p>
c0417b04
DW
102 <strong>{{#str}}activities{{/str}}</strong>
103 <ul class="inline list-inline p-2">
db650737 104 {{#coursemodules}}
207136f2 105 <li class="list-inline-item"><a href="{{url}}"><img src="{{iconurl}}"> {{name}} </a></li>
db650737
DW
106 {{/coursemodules}}
107 {{^coursemodules}}
c0417b04 108 <li class="list-inline-item">{{#str}}noactivities, tool_lp{{/str}}</li>
db650737
DW
109 {{/coursemodules}}
110 </ul>
f1947614 111 </p>
db650737 112 </div>
c0417b04
DW
113 <div data-region="learningplans">
114 <p>
115 <strong>{{#str}}userplans, core_competency{{/str}}</strong>
116 <ul class="inline list-inline p-2">
117 {{#plans}}
118 <li class="list-inline-item"><a href="{{pluginbaseurl}}/plan.php?id={{id}}">{{{name}}}</a></li>
119 {{/plans}}
120 {{^plans}}
121 <li class="list-inline-item">{{#str}}nouserplanswithcompetency, core_competency{{/str}}</li>
122 {{/plans}}
123 </ul>
124 </p>
125 </div>
d9a39950
DW
126 </td>
127 </tr>
128{{/competencies}}
129</tbody>
130</table>
131{{^competencies}}
beb3441b 132<p class="alert alert-info">
d9a39950
DW
133 {{#str}}nocompetenciesincourse, tool_lp{{/str}}
134</p>
135{{/competencies}}
136</div>
137<div data-region="actions">
de3b9193
FM
138 {{#canmanagecompetencyframeworks}}
139 <p><a href="{{manageurl}}">{{#str}}managecompetenciesandframeworks, tool_lp{{/str}}</a></p>
140 {{/canmanagecompetencyframeworks}}
d9a39950
DW
141</div>
142</div>
143{{#js}}
54c5a739 144require(['tool_lp/competencies'], function(mod) {
2de75345 145 (new mod({{courseid}}, 'course', {{pagecontextid}}));
d9a39950
DW
146});
147{{/js}}
7ba07487
DW
148{{#canconfigurecoursecompetencies}}
149{{#js}}
150require(['tool_lp/course_competency_settings'], function(Mod) {
151 (new Mod('[data-action=configure-course-competency-settings]'));
152});
153{{/js}}
154{{/canconfigurecoursecompetencies}}