updated timing for each question. increased timing actually
{% extends 'base.html' %}
{% block script %}
<script language="javascript">
var time_left = 300;
function dec_counter (){
time_left -= 1;
if (time_left) {
document.getElementById("time_left").value = "Time left: " + time_left + " secs";
setTimeout("dec_counter()", 1000);
}
else {
dopost();
}
}
function dopost (){
document.getElementById("queform").submit();
}
setTimeout("dec_counter()", 1000);
</script>
{% endblock %}
{% block content %}
Welcome {{user.get_full_name}} <br />
<br />
<ul>
<li> You are about to start quiz in a while </li>
<li> There will be a box (as shown below) where you have to type the answer </li>
<li> Please use 4 spaces for indentation </li>
<li> Some questions are multiple choice type and hence will have options instead of textbox </li>
<br />
<li> Each question will have a timer running at the bottom as shown in this page.</li>
<li> The question will auto submit after the timer runs out </li>
<li> You can also click the submit button to submit the answer before the timer ends </li>
<br />
<li> DO NOT refresh the page after the timer starts. If a question reloads, it is marked as incorrect </li>
<br />
The quiz starts after the timer on this page runs out.<br />
You can click on submit to start the quiz right away.<br />
All the best.<br /><br />
Answer:<br />
<textarea></textarea>
<form id="queform" action="/quiz/answer/{{quiz.key}}" method="get">
<input type="submit" value="Submit"></form>
<input type="button" value="Time left: 300 secs" id="time_left">
{% endblock %}