summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrabhu Ramachandran2011-11-21 14:02:14 +0530
committerPrabhu Ramachandran2011-11-21 14:02:14 +0530
commit75c5904f27dc82d9445804aa5a9543dae40fcdf2 (patch)
treefc28b974241d410d248d073ff1fd02c1cd862bfd
parent42bb0a6f98330fea247e5b9ddd42ee91e1680c9f (diff)
downloadonline_test-75c5904f27dc82d9445804aa5a9543dae40fcdf2.tar.gz
online_test-75c5904f27dc82d9445804aa5a9543dae40fcdf2.tar.bz2
online_test-75c5904f27dc82d9445804aa5a9543dae40fcdf2.zip
Show the question ID as well.
-rw-r--r--exam/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/exam/views.py b/exam/views.py
index 7157c45..a998606 100644
--- a/exam/views.py
+++ b/exam/views.py
@@ -359,7 +359,8 @@ def get_user_data(username):
paper['start_time'] = str(q_paper.start_time)
answers = {}
for answer in q_paper.answers.all():
- qs = answer.question.summary
+ question = answer.question
+ qs = '%d. %s'%(question.id, question.summary)
code = '#'*80 + '\n' + str(answer.answer) + '\n'
if qs in answers:
answers[qs] += code