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 qbank_columnsortorder/add_column
19
 
20
    Add column widget
21
 
22
    Displays a list of currently hidden columns, with links to add them back to the question bank.
23
 
24
    Context variables required for this template:
25
    * hiddencolumns - list of currently hidden columns
26
 
27
    Example context (json):
28
    {
29
        "hashiddencolumns": true,
30
        "hiddencolumns": [
31
            {
32
                "name": "Column A",
33
                "class": "class_name_A",
34
                "addurl": "/question/bank/columnsortorder/actions.php?action=add&column=class_name_A"
35
            },
36
            {
37
                "name": "Column B",
38
                "class": "class_name_B",
39
                "addurl": "/question/bank/columnsortorder/actions.php?action=add&column=class_name_B"
40
            }
41
        ]
42
    }
43
}}
44
{{#hashiddencolumns}}
45
    <div class="dropdown addcolumn">
46
        <button class="btn btn-outline-dark dropdown-toggle ml-1" data-toggle="dropdown" id="addcolumndropdown" aria-haspopup="true" aria-expanded="false">
47
            {{#str}}addcolumns, qbank_columnsortorder{{/str}}
48
        </button>
49
        <div class="dropdown-menu" aria-labelledby="addcolumndropdown">
50
            {{#hiddencolumns}}
51
                <a class="dropdown-item action-link" href="{{addurl}}" title="{{addtext}}" data-action="add" data-column="{{column}}">
52
                    {{name}}
53
                </a>
54
            {{/hiddencolumns}}
55
        </div>
56
    </div>
57
{{/hashiddencolumns}}