{% 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 }}
{{ quiz.title }}
{{ _("There are {0} questions in this quiz.").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 and 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. Each question will be given {0} seconds.").format(quiz.time) }}{% endif %}
{% for question in quiz.questions %} {% set instruction = _("Choose all answers that apply") if question.multiple else _("Choose 1 answer") %}
{{ loop.index }}.
{{ frappe.utils.md_to_html(question.question) }}
{{ instruction }}
{% 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 %}
{% endfor %}
{% endif %}