AutorÃa | Ultima modificación | Ver Log |
{{!This file is part of Moodle - http://moodle.org/Moodle is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation, either version 3 of the License, or(at your option) any later version.Moodle is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with Moodle. If not, see <http://www.gnu.org/licenses/>.}}{{!@template mod_questionnaire/results_textTemplate which defines a results display for text responses. This template uses a simple level of HTML, suitable for beingtranslated into a PDF file by the TCPDF library.Classes required for JS:* /mod/questionnaire/module.jsData attributes required for JS:* noneContext variables required for this template:Example context (json):{"responses": [{"response": {"respondent" : "User 1","text": "Some text"}},{"response": {"respondent" : "User 2","text": "Some other text"}}],"total": {"total": "8/10"}}}}<!-- Begin HTML generated from results_text template. -->{{#responses.0}}<table class="generaltable"><thead><tr><th class="header c0" style="text-align:left;" scope="col">{{#str}} respondent, mod_questionnaire {{/str}}</th><th class="header c1 lastcol" style="text-align:right;" scope="col">{{#str}} response, mod_questionnaire {{/str}}</th></tr></thead><tbody>{{/responses.0}}{{#responses}}{{#response}}<tr class=""{{^response.evencolor}} style="background-color: #E5E5E6"{{/response.evencolor}}><td class="cell c0" style="text-align:left;">{{{response.respondent}}}</td><td class="cell c1 lastcol" style="text-align:right;">{{{response.text}}}</td></tr>{{/response}}{{/responses}}{{#total}}<tr{{#total.evencolor}} style="background-color: #E5E5E6"{{/total.evencolor}}><td colspan="2"><div class="tabledivider"> </div></td></tr><tr class="lastrow"{{^total.evencolor}} style="background-color: #E5E5E6"{{/total.evencolor}}><td class="cell c0" style="text-align:left;">{{#str}} totalresponses, mod_questionnaire{{/str}}</td><td class="cell c1 lastcol" style="text-align:right;">{{total}}</td></tr>{{/total}}{{#responses.0}}</tbody></table>{{/responses.0}}{{^responses}}<p class="generaltable"> {{#str}} noresponsedata, questionnaire{{/str}}</p>{{/responses}}<!-- End HTML generated from results_choice template. -->