From 4d5c46617dd2c0e35bf0aaa67652b36a80a3debd Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 19 Aug 2021 11:49:34 +0100 Subject: [PATCH] . --- rapids/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rapids/views.py b/rapids/views.py index fb4d1ec4..117a9b1b 100755 --- a/rapids/views.py +++ b/rapids/views.py @@ -1137,6 +1137,10 @@ def question_review(request, pk, sk): Return a json representation of the question when the exam is active """ exam = get_object_or_404(Exam, pk=pk) + + if not exam.publish_results: + return Http404 + question = exam.exam_questions.all()[sk] question_json = question.get_question_json(based=False)