diff options
author | adityacp | 2018-01-18 12:30:57 +0530 |
---|---|---|
committer | adityacp | 2018-01-18 12:33:30 +0530 |
commit | 6e9fa57333261f2ef1e38f1de9f88e0daeed32da (patch) | |
tree | 1819fe81d477153e47d90cdae58c755daa2f254e /yaksh/views.py | |
parent | ef9b17ffcf89a3ce90930f7ce4e91b481ad2a53a (diff) | |
download | online_test-6e9fa57333261f2ef1e38f1de9f88e0daeed32da.tar.gz online_test-6e9fa57333261f2ef1e38f1de9f88e0daeed32da.tar.bz2 online_test-6e9fa57333261f2ef1e38f1de9f88e0daeed32da.zip |
Change in views.py and models.py
- Fetch all the answerpapers using questionpaper and course instead of only questionpaper
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 61bca4c..c586854 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -1158,7 +1158,7 @@ def show_statistics(request, questionpaper_id, attempt_number=None, course_id): return my_redirect('/exam/manage/') question_stats = AnswerPaper.objects.get_question_statistics( - questionpaper_id, attempt_number + questionpaper_id, attempt_number, course_id ) context = {'question_stats': question_stats, 'quiz': quiz, 'questionpaper_id': questionpaper_id, @@ -1532,9 +1532,9 @@ def download_quiz_csv(request, course_id, quiz_id): questions = question_paper.get_question_bank() answerpapers = AnswerPaper.objects.filter(question_paper=question_paper, - attempt_number=attempt_number) + attempt_number=attempt_number, course_id=course_id) if not answerpapers: - return monitor(request, quiz_id) + return monitor(request, quiz_id, course_id) response = HttpResponse(content_type='text/csv') response['Content-Disposition'] = 'attachment; filename="{0}-{1}-attempt{2}.csv"'.format( course.name.replace('.', ''), quiz.description.replace('.', ''), |