MDL-53529 tool_lp: Consistent 'add' buttons for templates and courses
[moodle.git] / report / competency / templates / report.mustache
CommitLineData
a8007119 1<div data-region="competency-breakdown-report" data-courseid="{{course.id}}" data-userid="{{user.id}}">
21e0dd61
DW
2<div class="row-fluid">
3<span class="span6">
bf780fbf 4<table class="table table-bordered">
a8007119 5<summary class="accesshide"><p>{{#str}}coursecompetencybreakdownsummary, report_competency{{/str}}</p></summary>
bf780fbf 6<tr>
21e0dd61
DW
7<th scope="col">{{#str}}competency, report_competency{{/str}}</span></th>
8<th scope="col">{{#str}}rating, report_competency{{/str}}</span></th>
bf780fbf
DW
9</tr>
10{{#usercompetencies}}
11<tr>
21e0dd61 12{{#competency}}
a8007119 13<td><a href="#" data-action="competency-dialogue" data-id="{{competency.id}}">{{competency.shortname}} <em>{{competency.idnumber}}</em></a></td>
21e0dd61
DW
14{{/competency}}
15{{#usercompetency}}
e07c2ef6
DW
16<td class="alert {{#proficiency}}alert-success{{/proficiency}}"
17 data-user-competency="true"
18 data-userid="{{user.id}}"
19 data-competencyid="{{competencyid}}"
20 data-courseid="{{course.id}}">
bf780fbf
DW
21{{> report_competency/user_competency_summary}}
22</td>
21e0dd61 23{{/usercompetency}}
bf780fbf
DW
24{{/usercompetencies}}
25</table>
21e0dd61
DW
26</span>
27</div>
e07c2ef6
DW
28</div>
29{{#js}}
30require(['tool_lp/competencydialogue'], function(Compdialogue) {
31 var competencydialogue = new Compdialogue({includerelated : true});
32 competencydialogue.watch('[data-region="competency-breakdown-report"]');
33});
34require(['report_competency/grading_popup'], function(Popup) {
35 (new Popup('[data-region=competency-breakdown-report]', '[data-user-competency=true]'));
36});
37{{/js}}