summaryrefslogtreecommitdiff
path: root/exam/management/commands
diff options
context:
space:
mode:
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 %}\
''')