{% set questions = quiz.questions %} {% set currentIndex = null %} {% for index, q in questions %} {% if q.id.toString == question.id.toString %} {% set currentIndex = index %} {% endif %} {% endfor %} {% if currentIndex > 0 %} {% set prevQuestion = questions[currentIndex - 1] %} {{ 'Previous'|trans }} {% endif %}

{{ currentIndex + 1 }}. {{ question }}

{% if currentIndex is not null and currentIndex < (questions|length - 1) %} {% set nextQuestion = questions[currentIndex + 1] %} {{ 'Next'|trans }} {% endif %}
{% for answer in question.answers %} {% endfor %} {% for candidate in candidates %} {% for answer in question.answers %} {% endfor %} {% endfor %}
{{ 'Candidate'|trans }}{{ answer }}
{{ candidate.name }}