mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-20 23:41:20 +00:00
Fix updateFinalExperimentMark
This commit is contained in:
parent
6c84829c4d
commit
7a1c0e9d55
1 changed files with 6 additions and 5 deletions
|
@ -535,11 +535,12 @@ 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 updateFinalExperimentMark(self):
|
def updateFinalExperimentMark(self):
|
||||||
semesterExperiment = self.group_experiment.semester_experiment
|
if None not in (self.oral_mark, self.protocol_mark):
|
||||||
self.final_experiment_mark = roundHalfUpToInt(
|
semesterExperiment = self.group_experiment.semester_experiment
|
||||||
semesterExperiment.oral_weighting * self.oral_mark
|
self.final_experiment_mark = roundHalfUpToInt(
|
||||||
+ semesterExperiment.protocol_weighting * self.protocol_mark
|
semesterExperiment.oral_weighting * self.oral_mark
|
||||||
)
|
+ semesterExperiment.protocol_weighting * self.protocol_mark
|
||||||
|
)
|
||||||
|
|
||||||
def repr(self):
|
def repr(self):
|
||||||
return f"Mark {self.final_experiment_mark}; Exp {self.group_experiment.semester_experiment.repr()}"
|
return f"Mark {self.final_experiment_mark}; Exp {self.group_experiment.semester_experiment.repr()}"
|
||||||
|
|
Loading…
Reference in a new issue