{% if attempts_exceeded %}

{{ quiz.title }}

{{ _("You have already exceeded the maximum number of attempts allowed for this quiz.") }} {{ _("Your latest score is {0}.").format(last_attempt_score) }}
{% else %}
{{ quiz.title }}
{{ _("This quiz consists of {0} questions.").format(quiz.questions | length) }}
{% if quiz.max_attempts %} {% set suffix = "times" if quiz.max_attempts > 1 else "time" %}
{{ _("This quiz can only be taken {0} {1}. If you attempt the quiz but leave the page before submitting, the quiz will be automatically submitted.").format(quiz.max_attempts, suffix) }}
{% endif %} {% if quiz.time %}
{{ _("The quiz has a time limit. For each question you will be given {0} seconds.").format(quiz.time) }}
{% endif %}
{% for question in quiz.questions %} {% set instruction = _("Choose all answers that apply") if question.type == "Choices" and question.multiple else _("Choose one answer") if question.type == "Choices" else _("Enter the correct answer") %}
{{ _("Question ") }}{{ loop.index }}: {{ instruction }}
{{ question.question }}
{% if question.type == "Choices" %} {% set options = [question.option_1, question.option_2, question.option_3, question.option_4] %} {% for option in options %} {% if option %}
{% set explanation = question['explanation_' + loop.index | string] %} {% if explanation %} {{ explanation }} {% endif %}
{% endif %} {% endfor %} {% else %}
{% endif %}
{% endfor %}
{% endif %}