From 75c5904f27dc82d9445804aa5a9543dae40fcdf2 Mon Sep 17 00:00:00 2001 From: Prabhu Ramachandran Date: Mon, 21 Nov 2011 14:02:14 +0530 Subject: Show the question ID as well. --- exam/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit