summaryrefslogtreecommitdiff
path: root/testapp/exam/views.py
diff options
context:
space:
mode:
authorprathamesh2015-01-20 17:30:48 +0530
committerprathamesh2015-01-20 17:30:48 +0530
commit09aed6db0be635d86c2bf7f9c9a989e6df1bceab (patch)
tree28adb727a41690ababad807588111c2f8cf3beaa /testapp/exam/views.py
parentf2e09edeb2e5b884f0e75ad3747b51e7603d70e1 (diff)
downloadonline_test-09aed6db0be635d86c2bf7f9c9a989e6df1bceab.tar.gz
online_test-09aed6db0be635d86c2bf7f9c9a989e6df1bceab.tar.bz2
online_test-09aed6db0be635d86c2bf7f9c9a989e6df1bceab.zip
View updated to take infinite quizzes.
Diffstat (limited to 'testapp/exam/views.py')
-rw-r--r--testapp/exam/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/testapp/exam/views.py b/testapp/exam/views.py
index ce1c62e..f94d383 100644
--- a/testapp/exam/views.py
+++ b/testapp/exam/views.py
@@ -189,7 +189,7 @@ def intro(request, questionpaper_id):
'attempt_no': already_attempted + 1}
return my_render_to_response('exam/intro.html', context,
context_instance=ci)
- if already_attempted < attempt_number:
+ if already_attempted < attempt_number or attempt_number < 0:
previous_attempt_day = attempted_papers[already_attempted-1].start_time
today = datetime.datetime.today()
days_after_attempt = (today - previous_attempt_day).days