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 mod_questionnaire/dataformat_selector
19
 
20
    Template for dataformat selection and download form.
21
 
22
    Context variables required for this template:
23
    * label
24
    * base
25
    * name
26
    * params
27
    * options
28
    * sesskey
29
    * submit
30
    * extrafields
31
 
32
    Example context (json):
33
    {
34
        "base": "http://example.org/",
35
        "name": "test",
36
        "label": "Download table data as",
37
        "params": [
38
            {
39
                "name": "fieldname",
40
                "value": "defaultvalue"
41
            }
42
        ],
43
        "extrafields": "Input HTML",
44
        "options": [
45
            {
46
                "label": "CSV",
47
                "name": "csv"
48
            },
49
            {
50
                "label": "Excel",
51
                "name": "excel"
52
            }
53
        ],
54
        "submit": "Download"
55
    }
56
}}
57
<form method="get" action="{{base}}" class="dataformatselector">
58
    <div>
59
        <input type="hidden" name="sesskey" value="{{sesskey}}">
60
        {{#extrafields}}{{{extrafields}}}{{/extrafields}}
61
        <div><label for="downloadtype_{{name}}">{{label}}</label>
62
        <select name="{{name}}" id="downloadtype_{{name}}">
63
        {{#options}}
64
            <option value="{{value}}">{{label}}</option>
65
        {{/options}}
66
        </select>
67
        <input type="submit" value="{{submit}}" class="btn btn-primary"></div><br />
68
        {{#allowemailreporting}}
69
        <div><input type="checkbox" name="emailroles" id="emailroles" value="1" />
70
        <label for="emailroles">{{#str}}emailroles, questionnaire{{/str}}</label> {{{emailroleshelp}}}
71
        <input type="text" name="emailextra" id="emailextra" value="" />
72
        <label for="emailextra">{{#str}}emailextra, questionnaire{{/str}}</label> {{{emailextrahelp}}}
73
        <input type="submit" value="{{#str}}emailsend, questionnaire{{/str}}" name="emailreport" class="btn btn-primary" /></div>
74
        {{/allowemailreporting}}
75
        {{#params}}
76
        <input type="hidden" name="{{name}}" value="{{value}}" />
77
        {{/params}}
78
    </div>
79
</form>