{{!
    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/>.

    Project implemented by the "Recovery, Transformation and Resilience Plan.
    Funded by the European Union - Next GenerationEU".
    Produced by the UNIMOODLE University Group: Universities of
    Valladolid, Complutense de Madrid, UPV/EHU, León, Salamanca,
    Illes Balears, Valencia, Rey Juan Carlos, La Laguna, Zaragoza, Málaga,
    Córdoba, Extremadura, Vigo, Las Palmas de Gran Canaria y Burgos
}}
{{!
    @template mod_kuet/sessionquestions

    Session Questions

    Classes required for JS:
    * None

    Data attibutes required for JS:
    * None

    Context variables required for this template:
    * none

    Example context (json):
    {
    }
}}
<div class="questions-list-body d-table list-group" data-region="question_list" data-sid="{{sid}}" data-cmid="{{cmid}}" data-kuetid="{{kuetid}}">
    <div class="d-table-row questions-list-thead">
        {{^ispage3}}
            {{^waitingroom}}
                <div class="d-table-cell"></div>
            {{/waitingroom}}
        {{/ispage3}}
        <div class="d-table-cell text-center">{{#str}}question_position, mod_kuet{{/str}}</div>
        <div class="d-table-cell">{{#str}}question_name, mod_kuet{{/str}}</div>
        <div class="d-table-cell text-center">{{#str}}question_type, mod_kuet{{/str}}</div>
        {{^ispage1}}
            <div class="d-table-cell text-center">{{#str}}question_time, mod_kuet{{/str}}</div>
        {{/ispage1}}
        <div class="d-table-cell text-center">{{#str}}question_version, mod_kuet{{/str}}</div>
        <div class="d-table-cell text-center">{{#str}}question_actions, mod_kuet{{/str}}</div>
    </div>
    {{#sessionquestions}}
        <div class="d-table-row questions-list-data question-item" data-questionnid="{{questionnid}}">
            {{^ispage3}}
                {{^waitingroom}}
                    <div class="d-table-cell">
                        <span tabindex="0" role="button" aria-haspopup="false" data-drag-type="move">
                            {{#pix}}i/dragger, mod_kuet{{/pix}}
                        </span>
                    </div>
                {{/waitingroom}}
            {{/ispage3}}
            <div class="d-table-cell text-center">{{position}}</div>
            <div class="d-table-cell">{{name}}</div>
            <div class="d-table-cell text-center">
                {{#icon}}
                    {{#pix}} {{key}}, {{component}}, {{title}} {{/pix}}
                {{/icon}}
            </div>
            {{^ispage1}}
                <div class="d-table-cell text-center">{{time}}</div>
            {{/ispage1}}
            <div class="d-table-cell text-center">{{version}} </div>
            <div class="d-table-cell actions">
                <div class="content-actions">
                    {{^ispage3}}
                        {{#managesessions}}
                            <a href="{{editquestionurl}}" class="question-action">
                                {{#pix}} i/edit_session, mod_kuet {{/pix}}
                            </a>
                            <div class="question-action" data-action="preview_question" data-questionnid="{{questionnid}}">
                                <div class="question-action" data-action="question_preview" data-questionnid="{{questionnid}}">
                                    {{#pix}} i/preview, mod_kuet {{/pix}}
                                </div>
                            </div>
                            <div class="question-action" data-action="delete_question" data-questionnid="{{questionnid}}">
                                {{#pix}} i/delete_session, mod_kuet {{/pix}}
                            </div>
                        {{/managesessions}}
                    {{/ispage3}}
                    {{#ispage3}}
                        <div class="question-action" data-action="question_preview" data-questionnid="{{questionnid}}">
                            {{#pix}} i/preview, mod_kuet {{/pix}}
                        </div>
                    {{/ispage3}}
                    {{#waitingroom}}
                        <div class="question-action" data-action="question_preview" data-questionnid="{{questionnid}}">
                            {{#pix}} i/preview, mod_kuet {{/pix}}
                        </div>
                    {{/waitingroom}}
                </div>
            </div>
        </div>
    {{/sessionquestions}}
</div>
{{#js}}
    require(['mod_kuet/sessionquestions'],
        function(SessionQuestions) {
            SessionQuestions.initSessionQuestions('[data-region="question_list"]');
        }
    );
{{/js}}
