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/user_data.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/user_data.html')
-rw-r--r-- | templates/exam/user_data.html | 59 |
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 %} |