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/form_competency_list
19
 
20
    List of competencies for a form element.
21
 
22
    Classes required for JS:
23
    * none
24
 
25
    Data attributes required for JS:
26
    * none
27
 
28
    Context variables required for this template:
29
    * competencies array
30
      * id int
31
      * shortname string
32
      * idnumber string
33
 
34
    Example context (json):
35
    {
36
        "competencies":
37
        [
38
            {
39
                "id": 1,
40
                "shortname": "Competency",
41
                "idnumber": "C1"
42
            }
43
        ]
44
    }
45
 
46
}}
47
<div data-region="competencies">
48
<ul>
49
    {{#competencies}}
50
        <li>
51
            <div class="float-right">
52
                <a href="#" data-action="deselect-competency" data-id="{{id}}">{{#pix}}t/delete, core, {{#str}}delete{{/str}}{{/pix}}</a>
53
            </div>
54
            <p>
55
                <a href="#" data-action="competency-dialogue" data-id="{{id}}">
56
                    {{{shortname}}}{{#idnumber}} {{idnumber}}{{/idnumber}}
57
                </a>
58
            </p>
59
        </li>
60
    {{/competencies}}
61
</ul>
62
{{^competencies}}
63
    {{#str}}nocompetenciesinlist, tool_lp{{/str}}
64
{{/competencies}}
65
</div>
66
{{#js}}
67
require(['tool_lp/competencydialogue'], function(Compdialogue) {
68
    Compdialogue.init();
69
});
70
{{/js}}