
{% if view_all_results %}

    <div class="alert alert-info" role="alert">
        Exam state:

        {% if exam.active %}
            This exam is available to take.
        {% else %}
            This exam is NOT available to take.
        {% endif %}


        {% if exam.publish_results %}
            Results are published.
        {% else %}
            Results are NOT published.
        {% endif %}

        {% if exam.results_supervisor_visible %}
            Results are visible to supervisors.
        {% else %}
            Results are NOT visible to supervisors.
        {% endif %}

        <br/>
        <a href="{{ exam.get_absolute_url }}"><button>Return to exam overview</button></a>

    </div>
{% else %}
    {% if not exam.publish_results %}
        <div class="alert alert-info no-results" role="alert">Results are not currently published. You can see your own answers below.</a></div>
    {% endif %}
{% endif %}

{% if supervisor %}
    <div class="alert alert-info" role="alert">Viewing results as a <a href='{% url "generic:supervisor_overview" supervisor.supervisor.pk %}'>supervisor</a>.</div>
{% endif %}
<h2>Exam: {{ exam }}</h2>
<h3>Candidate: {{ cid|default_if_none:request.user.username }}</h3>

{% comment %} {% if cid_user_exam %}
    {% if exam.results_supervisor_visible %}
        Exam results are visible to supervisor.<br/>
    {% else %}
        Share results with supervisor: {{cid_user_exam.share_with_supervisor}} <button
            class="btn btn-sm"
            hx-get="{% url 'generic:toggle_share_with_supervisor' cid_user_exam.pk %}"
        >Toggle</button>
        <br/>
    {% endif %}
{% endif %} {% endcomment %}
Answers: