{% macro confirm_modal(id, target, body, formAction, csrfToken) %} {% endmacro %}

{{ 'Quick actions'|trans }}

{% if quiz is same as (season.activeQuiz) %}
{% else %}
{% endif %}

{{ 'Questions'|trans }}

{%~ for question in quiz.questions ~%}

    {%~ for answer in question.answers %} {{ answer.text }} {% if answer.candidates|length > 0 %} ({{ answer.candidates|map(c => c.name)|join(', ') }}) {% endif %} {%~ else %} {{ 'There are no answers for this question'|trans -}} {%~ endfor %}
{% else %} {{ 'EMPTY'|trans }} {% endfor %}
{{ _self.confirm_modal( 'clearQuizModal', 'clearModal', 'Are you sure you want to clear all the results? This will also delete all the eliminations.'|trans, path('tvdt_backoffice_quiz_clear', {quiz: quiz.id}), csrf_token('clear_quiz'), ) }} {{ _self.confirm_modal( 'deleteQuizModal', 'deleteModal', 'Are you sure you want to delete this quiz?'|trans, path('tvdt_backoffice_quiz_delete', {quiz: quiz.id}), csrf_token('delete_quiz'), ) }}