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

{{ 'Quick actions'|trans }} {% if quiz.isFinalized %} {{ 'Finalized'|trans }} {% elseif quiz.isLocked %} {{ 'Locked (answers given)'|trans }} {% else %} {{ 'Draft'|trans }} {% endif %}

{% if quiz is same as (season.activeQuiz) %}
{% else %}
{% endif %} {% if not quiz.isFinalized %}
{% elseif not quiz.hasStartedCandidates and quiz is not same as (season.activeQuiz) %}
{% endif %} {{ 'Export to XLSX'|trans }}

{{ 'Questions'|trans }}

{%~ for question in quiz.questions ~%}
{% if is_granted('QUIZ_MODIFY_CONTENT', question) %} {% endif %}
{% set questionError = questionErrors[question.id.toString] ?? null %} ! {{ loop.index }}. {{ question.question }}
{% if is_granted('QUIZ_MODIFY_CONTENT', question) %} {% elseif quiz.isLocked %} {% endif %}
{% else %} {{ 'No questions have been added to this quiz yet.'|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'), ) }}
{{ include('backoffice/help/quiz_overview.html.twig') }}