summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authoradityacp2020-09-17 13:59:08 +0530
committeradityacp2020-09-17 13:59:08 +0530
commit45351763f76d75672419b8575f0a1561ee3a8a53 (patch)
tree8bbfc742f54a7f98f856d050e199a232d136b718 /yaksh/views.py
parenta9a8f286767468a55709215fbe584157f32a7300 (diff)
parentc9d0d238cd201310e5e6da546f518675f7a12440 (diff)
downloadonline_test-45351763f76d75672419b8575f0a1561ee3a8a53.tar.gz
online_test-45351763f76d75672419b8575f0a1561ee3a8a53.tar.bz2
online_test-45351763f76d75672419b8575f0a1561ee3a8a53.zip
Merge branch 'master' of https://github.com/FOSSEE/online_test into add_in_video_questions
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index e8bc2c6..2be8734 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -1798,7 +1798,6 @@ def user_data(request, user_id, questionpaper_id=None, course_id=None):
raise Http404('You are not allowed to view this page!')
user = User.objects.get(id=user_id)
data = AnswerPaper.objects.get_user_data(user, questionpaper_id, course_id)
-
context = {'data': data, 'course_id': course_id}
return my_render_to_response(request, 'yaksh/user_data.html', context)
@@ -1965,7 +1964,7 @@ def grade_user(request, quiz_id=None, user_id=None, attempt_number=None,
for paper in papers:
for question, answers in paper.get_question_answers().items():
marks = float(request.POST.get('q%d_marks' % question.id, 0))
- answer = answers[-1]['answer']
+ answer = answers[0]['answer']
answer.set_marks(marks)
answer.save()
paper.update_marks()