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.html59
1 files changed, 34 insertions, 25 deletions
diff --git a/templates/exam/user_data.html b/templates/exam/user_data.html
index c2e8014..7563e0e 100644
--- a/templates/exam/user_data.html
+++ b/templates/exam/user_data.html
@@ -1,49 +1,58 @@
{% extends "base.html" %}
-{% block title %} Data for user {{ user_data.name.title }} {% endblock title %}
+{% block title %} Data for user {{ data.user.get_full_name.title }} {% endblock title %}
{% block content %}
-<h1> Data for user {{ user_data.name.title }} </h1>
+<h1> Data for user {{ data.user.get_full_name.title }} </h1>
<p>
-Name: {{ user_data.name.title }} <br/>
-Username: {{ user_data.username }} <br/>
-Roll number: {{ user_data.rollno }} <br/>
-Email: {{ user_data.email }} <br/>
-Position: {{ user_data.position }} <br/>
-Department: {{ user_data.department }} <br/>
-Institute: {{ user_data.institute }} <br/>
-Date joined: {{ user_data.date_joined }} <br/>
-Last login: {{ user_data.last_login }}
+Name: {{ data.user.get_full_name.title }} <br/>
+Username: {{ data.user.username }} <br/>
+{% if data.profile %}
+Roll number: {{ data.profile.roll_number }} <br/>
+Position: {{ data.profile.position }} <br/>
+Department: {{ data.profile.department }} <br/>
+Institute: {{ data.profile.institute }} <br/>
+{% endif %}
+Email: {{ data.user.email }} <br/>
+Date joined: {{ data.user.date_joined }} <br/>
+Last login: {{ data.user.last_login }}
</p>
-{% if user_data.papers %}
+{% if data.papers %}
-{% for paper in user_data.papers %}
+{% for paper in data.papers %}
-<h2> Quiz: {{ paper.name }} </h2>
+<h2> Quiz: {{ paper.quiz.description }} </h2>
<p>
-Answered questions: {{ paper.answered }} <br/>
-Total attempts at questions: {{ paper.attempts }} <br/>
-Total marks: {{ paper.total }} <br/>
+Questions correctly answered: {{ paper.get_answered_str }} <br/>
+Total attempts at questions: {{ paper.answers.count }} <br/>
+Marks obtained: {{ paper.get_total_marks }} <br/>
Start time: {{ paper.start_time }} <br/>
User IP address: {{ paper.user_ip }}
</p>
-{% if paper.answers %}
+{% if paper.answers.count %}
<h3> Answers </h3>
-{% for question, answer in paper.answers.items %}
-<p><strong> Question: {{ question }} </strong> </p>
+{% for question, answers in paper.get_question_answers.items %}
+<p><strong> Question: {{ question.id }}. {{ question.summary }} (Points: {{ question.points }})</strong> </p>
+{% for answer in answers %}
<pre>
-{{ answer|safe }}
+################################################################################
+{{ answer.answer|safe }}
+# Autocheck: {{ answer.error }}
+# Marks: {{ answer.marks }}
</pre>
-{% endfor %}
-{% endif %} {# if paper.answers #}
+{% endfor %} {# for answer in answers #}
+{% endfor %} {# for question, answers ... #}
+<h3>Teacher comments: </h3>
+{{ paper.comments|default:"None" }}
+{% endif %} {# if paper.answers.count #}
-{% endfor %} {# for paper in user_data.papers #}
+{% endfor %} {# for paper in data.papers #}
-{% endif %} {# if user_data.papers #}
+{% endif %} {# if data.papers #}
{% endblock content %}