.
This commit is contained in:
+5
-2
@@ -1370,7 +1370,10 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
by_question = defaultdict(dict)
|
||||
unmarked = set()
|
||||
|
||||
questions = exam.exam_questions.all().prefetch_related("answers")
|
||||
if self.app_name in ("physics", "sbas"):
|
||||
questions = exam.exam_questions.all()
|
||||
else:
|
||||
questions = exam.exam_questions.all().prefetch_related("answers")
|
||||
|
||||
# We could prefect the CidUserAnswers.answers here (if we didn't cache them)
|
||||
cid_user_answers = self.CidUserAnswer.objects.select_related("question").filter(
|
||||
@@ -1383,7 +1386,7 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
for cid_user_answer in cid_user_answers:
|
||||
# Convoluted (probably...)
|
||||
if cid_user_answer.user is None:
|
||||
cid = cid_user_answer.cid
|
||||
cid = f"c/{cid_user_answer.cid}"
|
||||
# cid_passcodes[cid] = cid_user_answer.passcode
|
||||
cids.add(cid)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user