blob: 75e5a62f9ad5932bd88bf7a034528c1a222393f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<h2> {{ question.summary }} </h2>
<script type="text/javascript">
<!--
function submitCode()
{
document.forms["code"].submit();
var x = document.getElementById("status");
x.innerHTML = "<strong>Checking answer ...</strong>";
x = document.getElementById("check");
x.disabled = true;
x.value = "Checking Answer ...";
document.getElementById("skip").disabled = true;
}
//-->
</script>
<p>{{ question.description }} </p>
{% if error_message %}<p><strong>ERROR:</strong></p><pre>{{ error_message }}</pre>{% endif %}
<p id="status"></p>
<form id="code" action="/exam/{{ question.id }}/check/" method="post">
{% csrf_token %}
<textarea rows="20" cols="100" name="answer">
{% if last_attempt %}{{last_attempt}}{% else %}# Enter your answer here.{% endif %}
</textarea>
<br/>
<input id="check" type="submit" name="check" value="Check Answer"
onclick="submitCode();"/>
<input id="skip" type="submit" name="skip" value="Skip question" />
</form>
<p> {{ user.first_name.title }} {{ user.last_name.title }}, you have {{ paper.questions_left }} question(s) left. </p>
<hr/>
<form action="/exam/quit/" method="post">
{% csrf_token %}
<input type="submit" name="quit" value="Quit exam and logout" />
</form>
|