Proyectos de Subversion Moodle

Rev

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 modify
    it under the terms of the GNU General Public License as published by
    the 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 of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template mod_questionnaire/results_date

    Template which defines a results display for responses with dates. This template uses a simple level of HTML,
    suitable for being translated into a PDF file by the TCPDF library.

    Classes required for JS:
    * /mod/questionnaire/module.js

    Data attributes required for JS:
    * none

    Context variables required for this template:

    Example context (json):
    {
        "responses": [
            {
                "response": {
                    "text": "04/12/2016",
                    "total": 2
                }
            },
            {
                "response": {
                    "text": "06/01/2012",
                    "total": 2
                }
            }
        ],
        "total": {
            "total": "8/10"
        }
    }
    }}
<!-- Begin HTML generated from results_date template. -->
{{#responses.0}}
<table class="generaltable">
    <thead>
    <tr>
        <th class="header c0" style="text-align:left;" scope="col">{{#str}} num, 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.total}}</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">&nbsp;{{#str}} noresponsedata, questionnaire{{/str}}</p>
{{/responses}}
<!-- End HTML generated from results_choice template. -->