This commit is contained in:
Ross
2021-12-12 21:59:46 +00:00
parent f9f51d104a
commit 3a477205a3
+10 -10
View File
@@ -94,16 +94,16 @@ def cid_scores(request, pk, passcode):
longs_answers = LongsCidUserAnswer.objects.filter(cid=cid)
sbas_answers = SbasCidUserAnswer.objects.filter(cid=cid)
if (
not physics_answers
and not anatomy_answers
and not rapids_answers
and not longs_answers
and not sbas_answers
):
raise Http404("cid not found")
# if (
# not physics_answers
# and not anatomy_answers
# and not rapids_answers
# and not longs_answers
# and not sbas_answers
# ):
# raise Http404("cid not found")
kwargs = {"publish_results": True}
#kwargs = {"publish_results": True}
if request.user.groups.filter(name="view_all_results").exists():
kwargs = {}
@@ -134,7 +134,7 @@ def cid_scores(request, pk, passcode):
)
for n, t in exam_types:
exam_rel = getattr(cid_user, t)
exam_rel = getattr(cid_user, t)
if exam_rel.exists():
exams = exam_rel.all()
available_exams.append((n, exams))