{% if new_attempt %} {% endif %}
Осталось:

{{ test.title }}

{{ test.description }}

{% if test.max_attempts %}
Максимальное количество попыток: {{ test.max_attempts }}
{% endif %}
{% if test.display_mode == 'all' %} {# Режим: все вопросы на одной странице #} {% for question in questions %}
{{ loop.index }}. {{ question.question_text }}
{% if question.attachments %}
{% for file in question.attachments %} {% if file.file_type.startswith('image') %} Изображение {% elif file.file_type.startswith('audio') %} {% elif file.file_type.startswith('video') %} {% endif %} {% endfor %}
{% endif %} {% for answer in question.answers %}
{% endfor %}
{% endfor %} {% else %} {# Режим: по одному вопросу #} {% for question in questions %}
{{ loop.index }}. {{ question.question_text }}
{% if question.attachments %}
{% for file in question.attachments %} {% if file.file_type.startswith('image') %} Изображение {% elif file.file_type.startswith('audio') %} {% elif file.file_type.startswith('video') %} {% endif %} {% endfor %}
{% endif %} {% for answer in question.answers %}
{% endfor %}
{% if not loop.last %} {% else %} {% endif %}
{% endfor %} {% endif %}