This commit is contained in:
Ross
2021-12-14 22:12:32 +00:00
parent 770b96c30b
commit 33c9911bf4
2 changed files with 9 additions and 5 deletions
+5 -1
View File
@@ -220,10 +220,14 @@ class CidUser(models.Model):
def email_details(self): def email_details(self):
msg = f""" msg = f"""
Candidate details for upcomming event {self.group} See below for you details for: {self.group}
--------- ---------
CID: {self.cid} CID: {self.cid}
Passcode: {self.passcode} Passcode: {self.passcode}
---------
You will need these to login to the test system on the day.
+4 -4
View File
@@ -103,11 +103,11 @@ def cid_scores(request, pk, passcode):
# ): # ):
# raise Http404("cid not found") # raise Http404("cid not found")
# kwargs = {"publish_results": True} #kwargs = {"publish_results": True}
kwargs = {} kwargs = {"exam_mode": True}
if request.user.groups.filter(name="view_all_results").exists(): #if request.user.groups.filter(name="view_all_results").exists():
kwargs = {} # kwargs = {}
physics_exam_ids = physics_answers.values_list("exam").distinct() physics_exam_ids = physics_answers.values_list("exam").distinct()
physics_exams = PhysicsExam.objects.filter(id__in=physics_exam_ids, **kwargs) physics_exams = PhysicsExam.objects.filter(id__in=physics_exam_ids, **kwargs)