diff options
author | Prabhu Ramachandran | 2011-11-27 01:00:25 +0530 |
---|---|---|
committer | Prabhu Ramachandran | 2011-11-27 01:00:25 +0530 |
commit | ca63bd41c8ae023e30eed73e5afd878d7bba4e96 (patch) | |
tree | 8a1e301fafa004c0624a00736fb7cbb3696c9722 /exam | |
parent | 9b7c400f915e83492826be272d5201abfe1779f1 (diff) | |
download | online_test-ca63bd41c8ae023e30eed73e5afd878d7bba4e96.tar.gz online_test-ca63bd41c8ae023e30eed73e5afd878d7bba4e96.tar.bz2 online_test-ca63bd41c8ae023e30eed73e5afd878d7bba4e96.zip |
BUG: Was not selecting QP for active Quiz.
Diffstat (limited to 'exam')
-rw-r--r-- | exam/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/exam/views.py b/exam/views.py index 98fe7c7..892b35f 100644 --- a/exam/views.py +++ b/exam/views.py @@ -159,7 +159,7 @@ def question(request, q_id): return my_redirect('/exam/login/') q = get_object_or_404(Question, pk=q_id) try: - paper = QuestionPaper.objects.get(user=request.user) + paper = QuestionPaper.objects.get(user=request.user, quiz__active=True) except QuestionPaper.DoesNotExist: return my_redirect('/exam/start') if not paper.quiz.active: @@ -189,7 +189,7 @@ def check(request, q_id): if not user.is_authenticated(): return my_redirect('/exam/login/') question = get_object_or_404(Question, pk=q_id) - paper = QuestionPaper.objects.get(user=user) + paper = QuestionPaper.objects.get(user=user, quiz__active=True) answer = request.POST.get('answer') skip = request.POST.get('skip', None) |