{% extends "base.html" %}

{% block pagetitle %}Online Test{% endblock %}
{% block content %}
{% csrf_token %}
    {% if paper.questions_answered.all or paper.questions_unanswered.all %}
<center><table class="table table-bordered" >
        <caption> Submission Status </caption>
        <thead>
            <tr>
                <th> Question</th>
                <th> State </th>
            </tr>
        </thead>

        {% for question in paper.questions.all %}
            <tbody>
                {% if question in paper.questions_answered.all %}
                    <tr class="info">
                    <td> {{ question.summary }} </td>
                    <td> Attempted </td>
                {% else %}
                    <tr class="danger">
                    <td> {{ question }} </td>
                    <td> Not completed </td>
                {% endif %}
                </tr>
            </tbody>
        {% endfor %}
</table></center>
    {% endif %}
		<center><h2> Good bye! </h2></center>
		<center><h4> {{message}} </h4></center>
		<br><center><h4>You may now close the browser.</h4></center><br>
	<center><a href="{{URL_ROOT}}/exam/" id="home"> Home </a></center>
{% endblock content %}
