diff options
author | prathamesh | 2015-01-20 17:30:48 +0530 |
---|---|---|
committer | prathamesh | 2015-01-20 17:30:48 +0530 |
commit | 09aed6db0be635d86c2bf7f9c9a989e6df1bceab (patch) | |
tree | 28adb727a41690ababad807588111c2f8cf3beaa /testapp | |
parent | f2e09edeb2e5b884f0e75ad3747b51e7603d70e1 (diff) | |
download | online_test-09aed6db0be635d86c2bf7f9c9a989e6df1bceab.tar.gz online_test-09aed6db0be635d86c2bf7f9c9a989e6df1bceab.tar.bz2 online_test-09aed6db0be635d86c2bf7f9c9a989e6df1bceab.zip |
View updated to take infinite quizzes.
Diffstat (limited to 'testapp')
-rw-r--r-- | testapp/exam/views.py | 2 |
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 |