| author | nishanth |
| Wed, 21 Apr 2010 11:08:44 +0530 | |
| changeset 28 | 456b7b9e3d13 |
| parent 27 | 6233cf13fc12 |
| child 29 | ea1c0110e989 |
| permissions | -rw-r--r-- |
| 19 | 1 |
{% extends 'base.html' %}
|
2 |
{% block script %}
|
|
| 27 | 3 |
<script language="javascript"> |
4 |
var time_left = {{question.time_limit}};
|
|
5 |
function dec_counter (){
|
|
6 |
time_left -= 1; |
|
7 |
if (time_left) {
|
|
8 |
document.getElementById("time_left").value = "Time left: " + time_left + " secs";
|
|
9 |
setTimeout("dec_counter()", 1000);
|
|
10 |
} |
|
11 |
else {
|
|
12 |
dopost(); |
|
13 |
} |
|
14 |
} |
|
15 |
function dopost (){
|
|
| 19 | 16 |
document.getElementById("queform").submit();
|
17 |
} |
|
| 27 | 18 |
setTimeout("dec_counter()", 1000);
|
| 19 | 19 |
</script> |
20 |
{% endblock %}
|
|
21 |
{% block content %}
|
|
|
28
456b7b9e3d13
created a question bank xml file and created a seed_que command for adding questions to db from xml
nishanth
parents:
27
diff
changeset
|
22 |
{{question.description}} <br />
|
|
456b7b9e3d13
created a question bank xml file and created a seed_que command for adding questions to db from xml
nishanth
parents:
27
diff
changeset
|
23 |
{% if question.code %}
|
|
456b7b9e3d13
created a question bank xml file and created a seed_que command for adding questions to db from xml
nishanth
parents:
27
diff
changeset
|
24 |
<fieldset><legend>Code</legend> |
|
456b7b9e3d13
created a question bank xml file and created a seed_que command for adding questions to db from xml
nishanth
parents:
27
diff
changeset
|
25 |
<pre>{{question.code}}</pre></fieldset>
|
|
456b7b9e3d13
created a question bank xml file and created a seed_que command for adding questions to db from xml
nishanth
parents:
27
diff
changeset
|
26 |
{% endif %}
|
|
456b7b9e3d13
created a question bank xml file and created a seed_que command for adding questions to db from xml
nishanth
parents:
27
diff
changeset
|
27 |
|
| 19 | 28 |
<form action="" method="post" id="queform"> |
| 27 | 29 |
<textarea name="answer"></textarea><br /> |
30 |
<input type="button" value="Time left: {{question.time_limit}} secs" id="time_left">
|
|
| 19 | 31 |
</form> |
32 |
{% endblock %}
|