diff options
author | Prabhu Ramachandran | 2011-11-23 14:58:16 +0530 |
---|---|---|
committer | Prabhu Ramachandran | 2011-11-23 14:58:16 +0530 |
commit | 30f56443790841901f15b5ab435f97fba1c81d85 (patch) | |
tree | 006abd7932ca468661f5481e998c6a79f3058ecd /templates/exam/monitor.html | |
parent | ba2097a382b581dacced5cb9bd70087396a054f0 (diff) | |
download | online_test-30f56443790841901f15b5ab435f97fba1c81d85.tar.gz online_test-30f56443790841901f15b5ab435f97fba1c81d85.tar.bz2 online_test-30f56443790841901f15b5ab435f97fba1c81d85.zip |
ENH: Cleanup and adding error/comments for answers
Adding error and marks field to each answer. Adding a new comment field
to the question paper and also a profile field for convenience.
Changing the views, templates and dump scripts to use the models rather
than Python code. This cleans things up a lot more. The user data
logged and printed is also way more comprehensive, paving the way for
easy online grading as well in the next phase of changes.
Diffstat (limited to 'templates/exam/monitor.html')
-rw-r--r-- | templates/exam/monitor.html | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/templates/exam/monitor.html b/templates/exam/monitor.html index 1ce6c69..8f34a7f 100644 --- a/templates/exam/monitor.html +++ b/templates/exam/monitor.html @@ -6,7 +6,7 @@ {% block content %} -{% if not quiz_data and not paper_list %} +{% if not quizzes and not papers %} <h1> Quiz results </h1> <p> No quizzes available. </p> @@ -15,23 +15,23 @@ {# ############################################################### #} {# This is rendered when we are just viewing exam/monitor #} -{% if quiz_data %} +{% if quizzes %} <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> +{% for quiz in quizzes %} +<li><a href="{{URL_ROOT}}/exam/monitor/{{quiz.id}}/">{{ quiz.description }}</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> +{% if papers %} +<h1> {{ quiz.description }} results </h1> {# <p> Quiz: {{ quiz_name }}</p> #} -<p>Number of papers: {{ paper_list|length }} </p> +<p>Number of papers: {{ papers|length }} </p> <table border="1" cellpadding="3"> <tr> @@ -43,19 +43,21 @@ <th> Total marks </th> <th> Attempts </th> </tr> - {% for paper in paper_list %} + {% for paper in papers %} <tr> - <td> <a href="{{URL_ROOT}}/exam/user_data/{{paper.username}}">{{ paper.name.title }}</a> </td> - <td> <a href="{{URL_ROOT}}/exam/user_data/{{paper.username}}">{{ paper.username }}</a> </td> - <td> {{ paper.rollno }} </td> - <td> {{ paper.institute }} </td> - <td> {{ paper.answered }} </td> - <td> {{ paper.total }} </td> - <td> {{ paper.attempts }} </td> + <td> <a href="{{URL_ROOT}}/exam/user_data/{{paper.user.username}}"> + {{ paper.user.get_full_name.title }}</a> </td> + <td> <a href="{{URL_ROOT}}/exam/user_data/{{paper.user.username}}"> + {{ paper.user.username }}</a> </td> + <td> {{ paper.profile.roll_number }} </td> + <td> {{ paper.profile.institute }} </td> + <td> {{ paper.get_answered_str }} </td> + <td> {{ paper.get_total_marks }} </td> + <td> {{ paper.answers.count }} </td> </tr> {% endfor %} </table> -{% else %} {% if quiz_name %} +{% else %} {% if quiz %} <p> No answer papers so far. </p> {% endif %} {% endif %} |