.
This commit is contained in:
+2
-2
@@ -1042,10 +1042,10 @@ class ExamViews(View, LoginRequiredMixin):
|
|||||||
by_question = defaultdict(dict)
|
by_question = defaultdict(dict)
|
||||||
unmarked = set()
|
unmarked = set()
|
||||||
|
|
||||||
questions = exam.exam_questions.all()
|
questions = exam.exam_questions.all().prefetch_related("answers")
|
||||||
|
|
||||||
# We could prefect the CidUserAnswers.answers here (if we didn't cache them)
|
# We could prefect the CidUserAnswers.answers here (if we didn't cache them)
|
||||||
cid_user_answers = self.CidUserAnswer.objects.select_related("question").prefetch_related().filter(
|
cid_user_answers = self.CidUserAnswer.objects.select_related("question").filter(
|
||||||
question__in=questions, exam__id=pk
|
question__in=questions, exam__id=pk
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user