{% if finished|length > 0 %}

Previous labs

{% if labuser.is_tutor or admin %} {% endif %} {% for date, appointments in finished.items %} {% for appointment in appointments %} {% if labuser.is_tutor or admin %} {% endif %} {% empty %} {% endfor %} {% empty %} {% endfor %}
Lab date Experiment Students
{% if forloop.first %}{{ date }}{% endif %} {{ appointment.experiment.code }} {% if appointment.students.all|length == 0 %} - {% else %} {% for student in appointment.students.all %} {% if admin %} {{ student.short_name }} {% else %} {{ student.short_name }} {% endif %} {% endfor %} {% endif %}
No finished labs.
No lab appointments.

{% endif %}