{% extends "staff/staff_layout.html" %}
{% block staff_content %}
<h3>Responses for {{exam_info[1]}}</h3>
<br>
<div class="table-responsive">
  <table class="table table-bordered">
    <thead>
      <tr>
        <th scope="col" style="width: 36%">Name</th>
        <th scope="col" style="width: 36%">Email</th>
        <th scope="col">Marks</th>
        <th scope="col">Attempted on</th>
        <th scope="col"></th>
      </tr>
    </thead>
    <tbody>
      {% for response in exams_given %}
      <tr>
        <td>{{response[9]}} {{response[10]}}</td>
        <td>{{response[7]}}</td>
        <td>{{response[2]|int}}/{{exam_info[5]|int}}</td>
        <td>{{response[4]}}</td>
        <td>
          <center>
            <a href="{{ url_for('get_student_responses',e_code=response[0], user_id=response[1]) }}" type="button"
                class="btn btn-outline-primary">
                <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor"
                    class="bi bi-file-earmark-check" viewBox="0 0 16 16">
                    <path
                        d="M10.854 7.854a.5.5 0 0 0-.708-.708L7.5 9.793 6.354 8.646a.5.5 0 1 0-.708.708l1.5 1.5a.5.5 0 0 0 .708 0l3-3z" />
                    <path
                        d="M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z" />
                </svg>
            </a>
          </center>
        </td>
      </tr>
      {% endfor %}
    </tbody>
  </table>
</div>
{% endblock %}
