blob: c1809830b951695d5fb61c9a20a4603e6d8df5ba (
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
|
{% extends "base.html" %}
{% block title %} Data for user {{ user_data.name.title }} {% endblock title %}
{% block content %}
<h1> Data for user {{ user_data.name.title }} </h1>
<p> Name: {{ user_data.name.title }} </p>
<p> Username: {{ user_data.username }} </p>
<p> Roll number: {{ user_data.rollno }} </p>
<p> Email: {{ user_data.email }} </p>
<p> Date joined: {{ user_data.date_joined }} </p>
<p> Last login: {{ user_data.last_login }} </p>
{% if user_data.papers %}
{% for paper in user_data.papers %}
<h2> Quiz: {{ paper.name }} </h2>
<p> Answered questions: {{ paper.answered }} </p>
<p> Total attempts at questions: {{ paper.attempts }} </p>
<p> Total marks: {{ paper.total }} </p>
<p> Start time: {{ paper.start_time }} </p>
<p> User IP address: {{ paper.user_ip }} </p>
{% if paper.answers %}
<h3> Answers </h3>
{% for question, answer in paper.answers.items %}
<p><strong> Question: {{ question }} </strong> </p>
<pre>
{{ answer|safe }}
</pre>
{% endfor %}
{% endif %} {# if paper.answers #}
{% endfor %} {# for paper in user_data.papers #}
{% endif %} {# if user_data.papers #}
{% endblock content %}
|