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/reportpagepdf
19
 
20
    Template which defines a questionnaire completion page. This template uses a simple level of HTML, suitable for being
21
    translated into a PDF file by the TCPDF library.
22
 
23
    Classes required for JS:
24
    * /mod/questionnaire/module.js
25
 
26
    Data attributes required for JS:
27
    * none
28
 
29
    Context variables required for this template:
30
    * tabsarea - string: HTML of the tabs management area.
31
    * notifications - string: HTML of any notifications loaded.
32
    * myheaders - string: HTML of the page header.
33
    * navigationbar - string: HTML of the response navigation controls.
34
    * respondentinfo - string: HTML of any specific response/respondent information.
35
    * title - string: Text title of the questionnaire.
36
    * printblank - string: HTML of optional print blank questionnaire control.
37
    * subtitle - string: Optional text subtitle.
38
    * addinfo - string: Optional HTML additional information.
39
    * feedbackcharts - string: HTML of any chart displays.
40
    * feedbackscores - string: HTML of any feedback scores.
41
    * feedbackmessages - string: HTML of any feedback messages.
42
    * feedbacknotes - string: HTML of any feedback notes.
43
    * responses - array: Array of responses HTML.
44
    * bottomnavigationbar - string: HTML of the bottom response navigation controls.
45
 
46
    Example context (json):
47
    {
48
        "notifications": "<div>Notification one</div>",
49
        "myheaders": "HTML of the page header.",
50
        "respondentinfo": "<div>This is respondent information HTML</div>",
51
        "title": "Test Questionnaire HTML",
52
        "subtitle": "This is a subtitle HTML",
53
        "addinfo": "<div>This is additional information HTML.</div>",
54
        "feedbackcharts": "<div>Feedback charts HTML.</div>",
55
        "feedbackscores": "<div>Feedback scores HTML.</div>",
56
        "feedbackmessages": "<div>Feedback messages HTML.</div>",
57
        "feedbacknotes": "<div>Feedback notes HTML.</div>",
58
        "responses": [
59
            "Response 1 HTML",
60
            "Response 2 HTML"
61
        ],
62
        "bottomnavigationbar": "Navigation bar HTML"
63
    }
64
    }}
65
<div class="mod_questionnaire_reportpage generalbox">
66
    {{#notifications}}{{{notifications}}}{{/notifications}}
67
    <div class="box generalbox">
68
        {{#myheaders}}<h2>{{{.}}}</h2>{{/myheaders}}
69
        {{{respondentinfo}}}
70
        {{#title}}<h3 class="surveyTitle">{{{.}}}</h3>{{{printblank}}}{{/title}}
71
        {{#subtitle}}<h4 class="surveySubTitle">{{{.}}}</h4>{{/subtitle}}
72
        {{#addinfo}}<div class="addInfo">{{{.}}}</div>{{/addinfo}}
73
        {{#feedbackcharts}}{{{.}}}{{/feedbackcharts}}
74
        {{#feedbackscores}}{{{.}}}{{/feedbackscores}}
75
        {{#feedbackmessages}}
76
        <h3>{{# str }} feedbackreport, mod_questionnaire {{/ str }}</h3>
77
        {{{.}}}
78
        {{/feedbackmessages}}
79
        {{#feedbacknotes}}{{{.}}}{{/feedbacknotes}}
80
        {{#responses}}
81
        <table><tr style="padding: 8px;">
82
            {{#qnum}}<td style="width: 10%;"><span style="background-color: #eee; font-weight: bold; font-size: large;">{{qnum}}</span></td>{{/qnum}}
83
            <td style="background-color: #e4f1fa; width: 90%;">{{{qcontent}}}</td>
84
        </tr></table>
85
        <div>{{{results}}}</div>
86
        {{/responses}}
87
    </div>
88
</div>