{% extends base_template|default:'generic/exam_scores_base.html' %}

{% block table_answers %}
    {% for question in questions %}
        <tr>
            <td><a href="{% url 'rapids:mark' exam_pk=exam.pk sk=forloop.counter0 %}">Question {{forloop.counter}}</a>
                {% if question.normal %}
                    [N]
                {% else %}
                    [A]
                {% endif %}
            </td>
            {% for cid in cids %}
                {% with by_question|get_item:question|get_item:cid as ans_score %}
                    <td class="user-answer-score-{{ans_score.1}} col-cid-cell col-cid-{{ cid|slugify }}" title="answer score: {{ans_score.1}} [{{ans_score.2}}]" data-cid-name="{{ cids_user_id_map|get_item:cid|lower }}" data-cid-val="{{ cid|lower }}">{{ans_score.0}}</td>
                {% endwith %}
            {% endfor %}
        </tr>
    {% endfor %}

{% endblock table_answers %}

{% block breakdown %}
<details>
    <summary>Call breakdown</summary>
    <ul>
        {% for user, breakdown in user_answers_callstates.items %}
            <li>
                {{cids_user_id_map|get_item:user}} - {{breakdown}}
            </li>
        {% endfor %}
    </ul>
</details>
{% endblock breakdown %}