Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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/scale_configuration_page
19
 
20
    Set scale configuration for the competency framework.
21
 
22
    Classes required for JS:
23
    * none
24
 
25
    Data attibutes required for JS:
26
    * data-field
27
 
28
    Context variables required for this template:
29
    * scales Array of id / name pairs.
30
 
31
    Example context (json):
32
    {
33
        "scales": [
34
            { "id": 1, "name": "Competent" },
35
            { "id": 2, "name": "Not competent" }
36
        ]
37
    }
38
 }}
39
<div>
40
<table class="table generaltable w-100">
41
    <thead>
42
        <tr>
43
            <th scope="col">{{#str}}scalevalue, tool_lp{{/str}}</th>
44
            <th scope="col">{{#str}}default, tool_lp{{/str}}{{#pix }} req, core, {{#str}}requiredelement, form{{/str}} {{/pix }}</th>
45
            <th scope="col">{{#str}}proficient, tool_lp{{/str}}{{#pix }} req, core, {{#str}}requiredelement, form{{/str}}{{/pix }}</th>
46
        </tr>
47
    </thead>
48
    <tbody>
49
        {{#scales}}
50
        <tr class="tool_lp_scale_config">
51
            <td><small>{{name}}</small></td>
52
            <td>
53
                <div class="d-inline-flex mt-1 pb-0 mb-0 custom-control custom-radio custom-control-inline">
54
                    <input type="radio" name="default_{{uniqid}}" id="tool_lp_scale_default_{{id}}" data-field="tool_lp_scale_default_{{id}}" class="tool_lp_scale_default form-check-input custom-control-input"/>
55
                    <label class="custom-control-label ml-1" for="tool_lp_scale_default_{{id}}"></label>
56
                </div>
57
            </td>
58
            <td>
59
                <div class="custom-control custom-switch">
60
                    <input type="checkbox" class="custom-control-input tool_lp_scale_proficient" name="proficient" data-field="tool_lp_scale_proficient_{{id}}" id="tool_lp_scale_proficient_{{id}}">
61
                    <label class="custom-control-label" for="tool_lp_scale_proficient_{{id}}"></label>
62
                </div>
63
            </td>
64
        </tr>
65
        {{/scales}}
66
    </tbody>
67
</table>
68
</div>
69
 
70
<div data-region="scale-buttons" class="mt-1 w-100 mt-3 row no-gutters justify-content-between">
71
    <input type="button" class="col mr-1 btn btn-secondary" data-action="close" value="{{#str}}closebuttontitle{{/str}}"/>
72
    <input type="button" class="col ml-1 btn btn-danger" data-action="cancel" value="{{#str}}cancel{{/str}}"/>
73
</div>
74
<div class="clearfix"></div>