From c2185243e9e3e8a66a2a4c7a549d9bc00fd9f2fa Mon Sep 17 00:00:00 2001 From: Prabhu Ramachandran Date: Mon, 21 Nov 2011 02:41:27 +0530 Subject: ENH: Better monitor reporting and user_data info This checkin adds the following: - /exam/monitor displays all available quizzes. - /exam/monitor/quiz_id displays results for the specified quiz. - /exam/user_data/username displays the users data including answers. - A link is provided in monitor output to see user data. - More monitor data like number of attempts. - The monitor and user data are only shown for a user who is authenticated and is staff. --- templates/exam/user_data.html | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 templates/exam/user_data.html (limited to 'templates/exam/user_data.html') 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 %} + +

Data for user {{ user_data.name }}

+ +

Name: {{ user_data.name }}

+

Username: {{ user_data.username }}

+

Roll number: {{ user_data.rollno }}

+

Email: {{ user_data.email }}

+ +{% if user_data.papers %} + +{% for paper in user_data.papers %} + +

Quiz: {{ paper.name }}

+ +

Answered questions: {{ paper.answered }}

+

Total attempts at questions: {{ paper.attempts }}

+

Total marks: {{ paper.total }}

+ +{% if paper.answers %} +

Answers

+{% for question, answer in paper.answers.items %} +

Question summary: {{ question }}

+
 
+{{ answer|safe }}
+
+{% endfor %} +{% endif %} {# if paper.answers #} + +{% endfor %} {# for paper in user_data.papers #} + +{% endif %} {# if user_data.papers #} + +{% endblock content %} -- cgit