{% extends 'generic/base_supervisor.html' %}

{% load crispy_forms_tags %}
{% block css %}
{% endblock %}

{% block content %}

<h2>Trainee: {{trainee.first_name}} {{trainee.last_name}}</h2>
email: {{trainee.email}}


<h3>Results</h3>
<div id="exam-results">
    {% if all_exams %}
    The following exam results for the trainee are available.
    {% for exam_type, exams in all_exams %}
        {% if exams %}
            <h4>{{exam_type|title}}</h4>
            <ul class='{{exam_type|lower}}'>
                {% for exam in exams %}
                    <li class="exam" data-exam-id="{{exam.pk}}">

                            <a href= "{% url exam_type|add:':exam_scores_user_supervisor' pk=exam.pk user_id=trainee.pk %}"  title="Click to view results">

                        {{exam}}</a> {% if exam.active %}[Active]{% endif %} {% if exam.publish_results %}[Results Published]{% endif %}</li>
                {% endfor %}
            </ul>
        {% endif %}
    {% endfor %}
    {% else %}
    No results are available for this trainee.
{% endif %}
</div>
    

{% endblock %}

