summaryrefslogtreecommitdiff
path: root/exam/management/commands
diff options
context:
space:
mode:
authorPrabhu Ramachandran2011-11-21 15:46:54 +0530
committerPrabhu Ramachandran2011-11-21 15:46:54 +0530
commit4df6fb51be0661aaf0f852e4f2bedc2bb72e1eef (patch)
treefe5219e4f7a589c67b2fe2a595bef5aa94fcbb7a /exam/management/commands
parent75c5904f27dc82d9445804aa5a9543dae40fcdf2 (diff)
downloadonline_test-4df6fb51be0661aaf0f852e4f2bedc2bb72e1eef.tar.gz
online_test-4df6fb51be0661aaf0f852e4f2bedc2bb72e1eef.tar.bz2
online_test-4df6fb51be0661aaf0f852e4f2bedc2bb72e1eef.zip
ENH: Adding dept/insti/pos fields in profile.
Adding institute/department/position fields, prettifying form with some help text. Also prettified monitor and user data. Updated commands to show/dump new fields.
Diffstat (limited to 'exam/management/commands')
-rw-r--r--exam/management/commands/dump_user_data.py3
-rw-r--r--exam/management/commands/results2csv.py5
2 files changed, 6 insertions, 2 deletions
diff --git a/exam/management/commands/dump_user_data.py b/exam/management/commands/dump_user_data.py
index bd8f566..f14e144 100644
--- a/exam/management/commands/dump_user_data.py
+++ b/exam/management/commands/dump_user_data.py
@@ -14,6 +14,9 @@ Name: {{ user_data.name.title }}
Username: {{ user_data.username }}
Roll number: {{ user_data.rollno }}
Email: {{ user_data.email }}
+Position: {{ user_data.position }}
+Department: {{ user_data.department }}
+Institute: {{ user_data.institute }}
Date joined: {{ user_data.date_joined }}
Last login: {{ user_data.last_login }}
{% for paper in user_data.papers %}
diff --git a/exam/management/commands/results2csv.py b/exam/management/commands/results2csv.py
index 1adf442..f1da1a8 100644
--- a/exam/management/commands/results2csv.py
+++ b/exam/management/commands/results2csv.py
@@ -11,11 +11,12 @@ from exam.views import get_quiz_data
from exam.models import Quiz
result_template = Template('''\
-"name","username","rollno","email","answered","total","attempts"
+"name","username","rollno","email","answered","total","attempts","position","department","institute"
{% for paper in paper_list %}\
"{{ paper.name }}","{{ paper.username }}","{{ paper.rollno }}",\
"{{ paper.email }}","{{ paper.answered }}",{{ paper.total }},\
-{{ paper.attempts }}
+{{ paper.attempts }},"{{ paper.position }}",\
+"{{ paper.department }}","{{ paper.institute }}"
{% endfor %}\
''')