diff options
-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 |