{% extends 'atlas/exams.html' %}

{% block content %}
    <div class="vstack gap-3">
        {% for casedetail, answers in case_map.items %}
            <div class="border border-dark">
                <h4>Case: {{casedetail.case.title}}</h4>
                Answers
                <ul>
                    {% for answer in answers %}
                        <li {% if not answer.score %}class="flagged"{% endif %}>{{answer.answer}}
                            {% if not answer.score %}
                                <span class="badge rounded-pill bg-danger">Unmarked</span>


                            {% else %}
                                <span class="badge rounded-pill bg-info">Score: {{answer.score}}</span>
                            {% endif %}
                        </li>
                    {% endfor %}
                </ul>
                <a href="{% url 'atlas:collection_mark_question' collection.pk forloop.counter0 %}">Mark</a>
            </div>

        {% endfor %}
    </div>

{% endblock %}
