This commit is contained in:
Ross
2022-01-07 09:42:55 +00:00
parent 53a08d73b8
commit eadadeba40
3 changed files with 8 additions and 4 deletions
+5 -1
View File
@@ -320,7 +320,11 @@ class CidUser(models.Model):
def generate_exam_report(self):
exam_list = self.get_cid_exams()
exam_text = [f"Candidate {self.cid} [{self.email}]"]
name = ""
if self.name:
name = f"{self.name} "
exam_text = [f"Candidate {name}{self.cid} [{self.email}]"]
for exam_type, exams in exam_list:
exam_text.append(f"{'='*len(exam_type)}\n{exam_type}\n{'='*len(exam_type)}")