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_h5pactivity/local/result/answer
19
 
20
    This template render all kind of answers/choice in a results table.
21
 
22
    Variables required for this template:
23
    * answer - The answer/choice text
24
 
25
    Variables optional for this template:
26
    * pass - The answer pass
27
    * fail - The answer failed
28
    * correct - The answer is correct
29
    * incorrect - The answer is not correct
30
    * text - The choice is just text
31
    * checked - The choice must be checked
32
    * unchecked - The choice must be unchecked
33
 
34
    Example context (json):
35
    {
36
        "answer": "This was the ansewer,",
37
        "correct": true,
38
        "incorrect": true,
39
        "text": true,
40
        "checked": true,
41
        "unchecked": true,
42
        "pass": true,
43
        "fail": true
44
    }
45
 
46
}}
47
{{#correct}}
48
    {{#pix}}i/valid, moodle, {{#str}}answer_correct, mod_h5pactivity{{/str}}{{/pix}}{{answer}}
49
{{/correct}}
50
{{#incorrect}}
51
    {{#pix}}i/invalid, moodle, {{#str}}answer_incorrect, mod_h5pactivity{{/str}}{{/pix}}{{answer}}
52
{{/incorrect}}
53
{{#text}}
54
    {{answer}}
55
{{/text}}
56
{{#checked}}
57
    {{#pix}}i/checkedcircle, moodle, {{#str}}answer_checked, mod_h5pactivity{{/str}}{{/pix}}
58
{{/checked}}
59
{{#unchecked}}
60
{{/unchecked}}
61
{{#pass}}
62
    {{#pix}}i/valid, moodle, {{#str}}answer_pass, mod_h5pactivity{{/str}}{{/pix}}
63
{{/pass}}
64
{{#fail}}
65
    {{#pix}}i/invalid, moodle, {{#str}}answer_fail, mod_h5pactivity{{/str}}{{/pix}}
66
{{/fail}}