{% extends "templates/base.html" %} {% block title %} {{ quiz.title if quiz.name else _("Quiz Details") }} {% endblock %} {% block content %}
{{ Header() }}
{{ QuizForm(quiz) }}
{% endblock %} {% macro QuizForm(quiz) %}
{{ QuizDetails(quiz) }}
{% endmacro %} {% macro Header() %}
{{ _("Quiz Details") }}
{{ _("Quiz List") }} {{ quiz.title if quiz.title else _("New Quiz") }}
{% endmacro %} {% macro QuizDetails(quiz) %}
{{ _("Title") }}
{{ _("Add a title for the quiz") }}
{{ _("Max Attempts") }}
{{ _("Enter the maximum number of times a user can attempt this quiz") }}
{% set max_attempts = quiz.max_attempts if quiz.name else 0 %}
{{ _("Passing Percentage") }}
{{ _("Minimum percentage required to pass this quiz.") }}
{% set show_answers = quiz.show_answers or not quiz.name %}
{% endmacro %} {% macro Question(question, index) %} {% set type = question.type if question.type else "Choices" %}
{{ index }}. {{ question.question.split("\n")[0] }}
{% endmacro %} {% macro EmptyState() %}
{{ _("You have not added any question yet") }}
{{ _("Create and manage questions from here.") }}
{% endmacro %} {%- block script %} {{ super() }} {% if has_course_instructor_role() or has_course_moderator_role() %} {% endif %} {% endblock %}