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/previewpage
19
 
20
    Template which defines a questionnaire view page.
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
    * tabsarea - string: HTML of the tabs management area.
30
    * heading - string: HTML of the page heading.
31
    * formstart - string: Form start HTML.
32
    * notifications - string: HTML of any notifications loaded.
33
    * title - string: Text title of the questionnaire.
34
    * printblank - string: HTML of optional print blank questionnaire control.
35
    * subtitle - string: Optional text subtitle.
36
    * addinfo - string: Optional HTML additional information.
37
    * message - string: Any message HTML text.
38
    * questions - array: Array of questions HTML.
39
    * formend - string: Form end HTML.
40
    * closebutton - string: Close button HTML.
41
 
42
    Example context (json):
43
    {
44
        "tabsarea": "<div>HTML of the tabs area</div>",
45
        "heading": "HTML of the page heading",
46
        "formstart": "<form id=\"formid\" method=\"post\" action=\"index.php\">",
47
        "notifications": "<div>Notification one</div>",
48
        "title": "Test Questionnaire",
49
        "printblank": "<div>HTML of the print blank control.</div>",
50
        "subtitle": "This is a subtitle",
51
        "addinfo": "<div>This is additional information.</div>",
52
        "message": "<div>This is a message.</div>",
53
        "questions": [
54
            "<div>Question 1 HTML</div>",
55
            "<div>Question 2 HTML</div>"
56
        ],
57
        "formend": "</form>",
58
        "closebutton": "<div>close button HTML</div>"
59
    }
60
    }}
61
<div class="mod_questionnaire_previewpage">
62
    {{{tabsarea}}}
63
    <h2>{{{heading}}}</h2>
64
    {{{formstart}}}
65
    {{#notifications}}{{{.}}}{{/notifications}}
66
    <div class="box generalbox">
67
        <h3 class="surveyTitle">{{{title}}}</h3>{{{printblank}}}
68
        {{#subtitle}}<h4 class="surveySubTitle">{{.}}</h4>{{/subtitle}}
69
        {{#addinfo}}<div class="addInfo">{{{.}}}</div>{{/addinfo}}
70
        {{#message}}{{{.}}}{{/message}}
71
        {{#questions}}{{{.}}}{{/questions}}
72
    </div>
73
    {{{formend}}}
74
</div>
75
{{#closebutton}}{{{.}}}{{/closebutton}}