1 |
efrain |
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/competency_rule_points
|
|
|
19 |
|
|
|
20 |
Configuration dialogue for competency points rule.
|
|
|
21 |
|
|
|
22 |
Context variables required for this template:
|
|
|
23 |
* children
|
|
|
24 |
* id
|
|
|
25 |
* shortname
|
|
|
26 |
* points
|
|
|
27 |
* requiredpoints
|
|
|
28 |
|
|
|
29 |
Example context (json):
|
|
|
30 |
{
|
|
|
31 |
"children": [
|
|
|
32 |
{
|
|
|
33 |
"id": "1",
|
|
|
34 |
"shortname": "Competency",
|
|
|
35 |
"points": 2
|
|
|
36 |
}
|
|
|
37 |
],
|
|
|
38 |
"requiredpoints": 4
|
|
|
39 |
}
|
|
|
40 |
}}
|
|
|
41 |
<div class="competency-rule-points">
|
|
|
42 |
<table class="table table-condensed">
|
|
|
43 |
<thead>
|
|
|
44 |
<tr>
|
|
|
45 |
<th scope="col"></th>
|
|
|
46 |
<th scope="col">{{#str}}points, tool_lp{{/str}}</th>
|
|
|
47 |
<th scope="col">{{#str}}required{{/str}}</th>
|
|
|
48 |
</tr>
|
|
|
49 |
</thead>
|
|
|
50 |
<tbody>
|
|
|
51 |
{{#children}}
|
|
|
52 |
<tr data-competency="{{id}}">
|
|
|
53 |
<th scope="row">{{{shortname}}}</th>
|
|
|
54 |
<td>
|
|
|
55 |
<label class="accesshide" for="pointsforcompetency-{{id}}">{{#str}}pointsgivenfor, tool_lp, {{{competency.shortname}}}{{/str}}</label>
|
|
|
56 |
<input id="pointsforcompetency-{{id}}" type="number" min="0" value="{{points}}" name="points" class="form-control"/>
|
|
|
57 |
</td>
|
|
|
58 |
<td>
|
|
|
59 |
<div class="custom-control custom-switch mx-0">
|
|
|
60 |
<input id="competency-{{id}}-isrequired" class="custom-control-input" type="checkbox" value="1" name="required" {{#required}}checked{{/required}} />
|
|
|
61 |
<label class="custom-control-label" for="competency-{{id}}-isrequired"></label>
|
|
|
62 |
<label class="accesshide" for="competency-{{id}}-isrequired">{{#str}}aisrequired, tool_lp, {{{competency.shortname}}}{{/str}}</label>
|
|
|
63 |
</div>
|
|
|
64 |
</td>
|
|
|
65 |
</tr>
|
|
|
66 |
{{/children}}
|
|
|
67 |
</tbody>
|
|
|
68 |
<tfoot>
|
|
|
69 |
<tr>
|
|
|
70 |
<th scope="row">{{#str}}totalrequiredtocomplete, tool_lp{{/str}}</th>
|
|
|
71 |
<td><input type="number" min="1" value="{{requiredpoints}}" name="requiredpoints" aria-label="{{#str}}totalrequiredtocomplete, tool_lp{{/str}}" class="form-control"></td>
|
|
|
72 |
<td> </td>
|
|
|
73 |
</tr>
|
|
|
74 |
</tfoot>
|
|
|
75 |
</table>
|
|
|
76 |
</div>
|