blob: 201e5dbb9f357a21e3c272415447b38e9dcd8b89 (
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
{% extends "base.html" %}
{% block title %} Quiz results {% endblock title %}
{% block meta %} <meta http-equiv="refresh" content="30"/> {% endblock meta %}
{% block content %}
{% if not quiz_data and not paper_list %}
<h1> Quiz results </h1>
<p> No quizzes available. </p>
{% endif %}
{# ############################################################### #}
{# This is rendered when we are just viewing exam/monitor #}
{% if quiz_data %}
<h1> Available quizzes </h1>
<ul>
{% for quiz_id, quiz_name in quiz_data.items %}
<li><a href="{{URL_ROOT}}/exam/monitor/{{quiz_id}}/">{{ quiz_name }}</a></li>
{% endfor %}
</ul>
{% endif %}
{# ############################################################### #}
{# This is rendered when we are just viewing exam/monitor/quiz_num #}
{% if paper_list %}
<h1> {{ quiz_name }} results </h1>
{# <p> Quiz: {{ quiz_name }}</p> #}
<p>Number of papers: {{ paper_list|length }} </p>
<table border="1" cellpadding="3">
<tr>
<th> Name </th>
<th> Username </th>
<th> Roll number </th>
<th> Questions answered </th>
<th> Total marks </th>
<th> Attempts </th>
</tr>
{% for paper in paper_list %}
<tr>
<td> <a href="{{URL_ROOT}}/exam/user_data/{{paper.username}}">{{ paper.name }}</a> </td>
<td> <a href="{{URL_ROOT}}/exam/user_data/{{paper.username}}">{{ paper.username }}</a> </td>
<td> {{ paper.rollno }} </td>
<td> {{ paper.answered }} </td>
<td> {{ paper.total }} </td>
<td> {{ paper.attempts }} </td>
</tr>
{% endfor %}
</table>
{% else %} {% if quiz_name %}
<p> No answer papers so far. </p>
{% endif %}
{% endif %}
{% endblock content %}
|