{% if not hide_quiz %}
{{ quiz.title }}
{% if not quiz.max_attempts or no_of_attempts < quiz.max_attempts %} {% else %}
{{ _("You have already exceeded the maximum number of attempts allowed for this quiz.") }}
{% 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.marks }} {{ _("Marks") }}
{{ _("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 %} {% if quiz.show_submission_history and all_submissions | length %}
{{ _("All Submissions") }}
{{ _("No.") }}
{{ _("Score") }}
{{ _("Date") }}
{% for submission in all_submissions %}
{{ loop.index }}
{{ submission.score }}
{{ frappe.utils.pretty_date(submission.creation) }}
{% endfor %}
{% endif %}