{% extends 'quiz/base.html' %}

{% block content %}
  {% include 'quiz/_header.html' with active='taken' %}
  <div class="card">
    <table class="table mb-0">
      <thead>
        <tr>
          <th>Quiz</th>
          <th>Subject</th>
          <th>%</th>
        </tr>
      </thead>
      <tbody>
        {% for taken_quiz in taken_quizzes %}
          <tr>
            <td><a href="{% url 'quiz:student_quiz_results' taken_quiz.quiz.id %}">{{ taken_quiz.quiz.name }}</a></td>
            <td>{{ taken_quiz.quiz.subject.get_html_badge }}</td>
            <td>{{ taken_quiz.percentage }}</td>
          </tr>
        {% empty %}
          <tr>
            <td class="bg-light text-center font-italic" colspan="3">You haven't completed any quiz yet.</td>
          </tr>
        {% endfor %}
      </tbody>
    </table>
  </div>
{% endblock %}
