summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhardythe12014-07-02 12:15:19 +0530
committerhardythe12014-07-02 12:15:19 +0530
commit7a6fc986fbc4a857b619764defeda377dd9d3a68 (patch)
tree8ee17677d4ba1472186b8902b3efeb087d0ea6a4
parentad4a695e16dc5de2bba4851bbc3329bcdaab76cf (diff)
downloadonline_test-7a6fc986fbc4a857b619764defeda377dd9d3a68.tar.gz
online_test-7a6fc986fbc4a857b619764defeda377dd9d3a68.tar.bz2
online_test-7a6fc986fbc4a857b619764defeda377dd9d3a68.zip
changes to start the quiz if prerequisite is passed
-rw-r--r--testapp/exam/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/testapp/exam/views.py b/testapp/exam/views.py
index 44831b3..8b251a0 100644
--- a/testapp/exam/views.py
+++ b/testapp/exam/views.py
@@ -171,7 +171,8 @@ def intro(request, questionpaper_id):
if quest_paper.quiz.prerequisite:
try:
answer_paper = AnswerPaper.objects.get(
- id=quest_paper.quiz.prerequisite.id)
+ quest_paper.quiz.id=quest_paper.quiz.prerequisite.id,
+ user=user)
if answer_paper.passed:
context = {'user': user, 'paper_id': questionpaper_id}
return my_render_to_response('exam/intro.html', context,