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/response_radio
19
 
20
    Template which defines a check type question survey display.
21
 
22
    Classes required for JS:
23
    * /mod/questionnaire/module.js
24
 
25
    Data attributes required for JS:
26
    * none
27
 
28
    Context variables required for this template:
29
 
30
    Example context (json):
31
    {
32
        "choices": [
33
            {
34
                "horizontal": 1,
35
                "selected": "1",
36
                "name": "choice1",
37
                "content": "HTML for choice 1",
38
                "othercontent": "Text other content"
39
            },
40
            {
41
                "horizontal": 1,
42
                "selected": "",
43
                "name": "choice2",
44
                "content": "HTML for choice 2"
45
            }
46
        ]
47
    }
48
}}
49
<!-- Begin HTML generated from response_radio template. -->
50
<div class="questionnaire_response questionnaire_radio">
51
{{#choices}}
52
    {{#horizontal}}<span style="white-space:nowrap;">{{/horizontal}}
53
    {{#selected}}
54
    <span class="selected">
55
        {{^pdf}}<input type="radio" name="{{name}}" checked="checked" disabled="disabled" />{{/pdf}}
56
        {{#pdf}}&#10003;{{/pdf}} {{{content}}}{{#othercontent}} <span class="response text">{{.}}</span>{{/othercontent}}
57
    </span>
58
    {{/selected}}
59
    {{^selected}}
60
        <span class="unselected"{{#pdf}} color="gray"{{/pdf}}>{{^pdf}}<input type="radio" name="{{name}}" disabled="disabled" />{{/pdf}}
61
        {{{content}}}</span>&nbsp;
62
    {{/selected}}
63
    {{#horizontal}}</span>{{/horizontal}}
64
    {{^horizontal}}<br />{{/horizontal}}
65
{{/choices}}
66
</div>
67
<!-- End HTML generated from response_radio template. -->