{% extends "base.html" %}

{% block title %}Quit exam {% endblock %}
{% block pagetitle %}Online Test {% endblock %}
{% block content %}
	{% if submitted or unattempted %}
		<br><center><table class="bordered-table zebra-striped span8"
		 style="text-align:left;">
			<tr><td><b>Submitted Questions</b></td>
			<td>
			{% if submitted %}
				{{ submitted|join:", " }}
			{% else %}
				<p><b>No Questions have been Submitted</b></p>
			{% endif %}
			</td></tr>
			<tr><td><b>Unattempted Questions</b></td>
			<td>
			{% if unattempted %}
				{{ unattempted|join:", " }}
			{% else %}
				<p><b>All Questions have been Submitted</b></p>
			{% endif %}
			</td></tr>
		</table></center>
	{% endif %}

	<center><h4>Your current answers are saved.</h4></center>
	<center><h4> Are you sure you wish to quit the exam?</h4></center>
	<center><h4> Be sure, as you won't be able to restart this exam.</h4></center>
	<form action="{{URL_ROOT}}/exam/complete/{{ attempt_num }}/{{ id }}/" method="post">
	{% csrf_token %}
	<center><button class="btn" type="submit" name="yes">Yes!</button>&nbsp;<button class="btn" type="button" name="no" onClick="window.location='{{ URL_ROOT }}/exam/start/{{ attempt_num }}/{{ id }}/'">No!</button></center>
	</form>
{% endblock content %}
