diff options
author | prathamesh | 2016-03-07 17:20:55 +0530 |
---|---|---|
committer | prathamesh | 2016-03-07 17:20:55 +0530 |
commit | c974da07d46709d3aa3640ba69c89d1a287ff3c1 (patch) | |
tree | 444f167c4bf4516b84e0cfeb6e60e921ae8519f8 /yaksh/views.py | |
parent | e94f589eea5fbe85253d35f836d308bbfd339ff0 (diff) | |
download | online_test-c974da07d46709d3aa3640ba69c89d1a287ff3c1.tar.gz online_test-c974da07d46709d3aa3640ba69c89d1a287ff3c1.tar.bz2 online_test-c974da07d46709d3aa3640ba69c89d1a287ff3c1.zip |
UI modification and checks for answerpaper before evaluating.
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 20a416d..9cd6fdb 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -949,7 +949,7 @@ def check(request, q_id, attempt_num=None, questionpaper_id=None): """Checks the answers of the user for particular question""" user = request.user q_paper = QuestionPaper.objects.get(id=questionpaper_id) - paper = AnswerPaper.objects.get(user=request.user, attempt_number=attempt_num, + paper = get_object_or_404(AnswerPaper, user=request.user, attempt_number=attempt_num, question_paper=q_paper) if q_id in paper.questions_answered: |