summaryrefslogtreecommitdiff
path: root/templates/exam/user_data.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/exam/user_data.html')
-rw-r--r--templates/exam/user_data.html38
1 files changed, 38 insertions, 0 deletions
diff --git a/templates/exam/user_data.html b/templates/exam/user_data.html
new file mode 100644
index 0000000..7560903
--- /dev/null
+++ b/templates/exam/user_data.html
@@ -0,0 +1,38 @@
+{% extends "base.html" %}
+
+{% block title %} Data for user {{ user_data.name }} {% endblock title %}
+
+{% block content %}
+
+<h1> Data for user {{ user_data.name }} </h1>
+
+<p> Name: {{ user_data.name }} </p>
+<p> Username: {{ user_data.username }} </p>
+<p> Roll number: {{ user_data.rollno }} </p>
+<p> Email: {{ user_data.email }} </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>
+
+{% if paper.answers %}
+<h3> Answers </h3>
+{% for question, answer in paper.answers.items %}
+<h4> Question summary: {{ question }} </h4>
+<pre>
+{{ answer|safe }}
+</pre>
+{% endfor %}
+{% endif %} {# if paper.answers #}
+
+{% endfor %} {# for paper in user_data.papers #}
+
+{% endif %} {# if user_data.papers #}
+
+{% endblock content %}