1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-11-08 21:21:06 +00:00

Improved repr for ExperimentMark

This commit is contained in:
Mo 2021-08-21 23:31:16 +02:00
parent 3b7c186baf
commit 96a32a3c3a

View file

@ -124,7 +124,7 @@ class PartStudent(db.Model):
category, category,
) )
else: else:
flash(f"Final part mark did not change for {self} from {oldFinalPartMark}.") flash(f"Final part mark did not change for {self} from {oldFinalPartMark}.", "warning")
def repr(self): def repr(self):
return f"{self.student.repr()} {self.part.repr()}" return f"{self.student.repr()} {self.part.repr()}"
@ -481,7 +481,9 @@ class ExperimentMark(db.Model):
return ExperimentMark(part_student=part_student, group_experiment=group_experiment) return ExperimentMark(part_student=part_student, group_experiment=group_experiment)
def repr(self): def repr(self):
return f"Oral {self.oral_mark}; Prot {self.protocol_mark}" return (
f"Oral {self.oral_mark}; Prot {self.protocol_mark}; Exp {self.group_experiment.semester_experiment.repr()}"
)
def __repr__(self): def __repr__(self):
return f"<EXPMARK {self.repr()}>" return f"<EXPMARK {self.repr()}>"