summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authoradityacp2017-11-23 10:46:00 +0530
committeradityacp2017-11-23 14:26:48 +0530
commite69b7bffb7a21ebd6468ae77ad462c7b85184f1a (patch)
tree3dc0dcb3b43721db7a366b5084534d8088b1e164 /yaksh/views.py
parent4fc8565be63375b48a7a897a1701e264f4ccac66 (diff)
downloadonline_test-e69b7bffb7a21ebd6468ae77ad462c7b85184f1a.tar.gz
online_test-e69b7bffb7a21ebd6468ae77ad462c7b85184f1a.tar.bz2
online_test-e69b7bffb7a21ebd6468ae77ad462c7b85184f1a.zip
Change urls, views, template, test_views
- Fix view answer paper for student - Fix existing views test cases
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index 524d4d5..5bc0e0a 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -1732,7 +1732,8 @@ def test_quiz(request, mode, quiz_id, course_id=None):
def view_answerpaper(request, questionpaper_id, course_id):
user = request.user
quiz = get_object_or_404(QuestionPaper, pk=questionpaper_id).quiz
- if quiz.view_answerpaper and user in quiz.course.students.all():
+ course = get_object_or_404(Course, pk=course_id)
+ if quiz.view_answerpaper and user in course.students.all():
data = AnswerPaper.objects.get_user_data(user, questionpaper_id,
course_id)
has_user_assignment = AssignmentUpload.objects.filter(