{% set _quiz = _quiz | default(none) %}
<fieldset class="quiz-settings">
    <legend>Settings</legend>
    <label class="quiz-check">
        <input type="checkbox" name="shuffle_questions" value="1" {% if _quiz and _quiz.shuffle_questions %}checked{% endif %}>
        <span>Shuffle the question order per attempt</span>
    </label>
    <label class="quiz-check">
        <input type="checkbox" name="shuffle_options" value="1" {% if _quiz and _quiz.shuffle_options %}checked{% endif %}>
        <span>Shuffle the answer options</span>
    </label>
    <label class="quiz-check">
        <input type="checkbox" name="reveal_answers" value="1" {% if _quiz and _quiz.reveal_answers %}checked{% endif %}>
        <span>Reveal the correct answer after each question</span>
    </label>
    <label class="quiz-check">
        <input type="checkbox" name="allow_review" value="1" {% if not _quiz or _quiz.allow_review %}checked{% endif %}>
        <span>Allow reviewing every answer on the results screen</span>
    </label>
    <label class="quiz-field">
        <span class="quiz-field-label">Time limit in seconds (0 for none)</span>
        <input type="number" name="time_limit_seconds" min="0" max="86400" value="{{ _quiz.time_limit_seconds if _quiz else 0 }}">
    </label>
    <label class="quiz-field">
        <span class="quiz-field-label">Pass mark in percent (0 for no verdict)</span>
        <input type="number" name="pass_percent" min="0" max="100" value="{{ _quiz.pass_percent if _quiz else 0 }}">
    </label>
</fieldset>
