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/competency_picker_competencyform
19
 
20
    Show a competency tree and allow picking a competency.
21
 
22
    Context variables required for this template:
23
    * framework - The competency framework
24
      * id
25
      * name
26
      * shortname
27
 
28
    * competencies - array of nodes
29
      * id - competency id
30
      * name - competency idnumber
31
      * children - array of children
32
      * haschildren - boolean
33
 
34
    Example context (json):
35
    {
36
        "framework": {
37
            "id": "1",
38
            "name": "Framework"
39
        },
40
        "competencies": [
41
        ]
42
    }
43
}}
44
<div data-region="competencylinktree">
45
<h3>{{#str}}locatecompetency, tool_lp{{/str}}</h3>
46
 
47
<form data-region="filtercompetencies" class="d-flex flex-wrap align-items-center" data-frameworkid="{{framework.id}}">
48
    <div class="mb-3 d-flex">
49
        <label class="accesshide" for="filter{{uniqid}}">{{#str}}search, tool_lp{{/str}}</label>
50
        <input type="text" class="form-control" id="filter{{uniqid}}" placeholder="{{#str}}search, tool_lp{{/str}}" value="{{search}}">
51
        <button class="btn btn-secondary ml-1">{{#pix}}a/search, ,{{#str}}search{{/str}}{{/pix}}</button>
52
    </div>
53
</form>
54
<ul data-enhance="linktree" style="display: none;" class="mt-1 competency-tree">
55
    <li data-id="0"><span>{{{framework.shortname}}}</span>
56
        <ul>
57
            {{#competencies}}
58
                {{> tool_lp/competencies_tree }}
59
            {{/competencies}}
60
        </ul>
61
    </li>
62
</ul>
63
<div data-region="link-buttons" class="mt-1 float-sm-right">
64
    <input type="button" class="btn btn-primary" data-action="add" value="{{#str}}select{{/str}}"/>
65
    <input type="button" class="btn btn-secondary" data-action="cancel" value="{{#str}}cancel{{/str}}"/>
66
</div>
67
<div class="clearfix"></div>
68
</div>