From 6de9bcf51b42077e9628c4ad4d0e06a6932e7aa0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Wed, 20 Nov 2013 16:37:51 +0100 Subject: [PATCH 1/1] Final mark as an average from individual marks --- wtem/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wtem/models.py b/wtem/models.py index d24430d..4c3d0ee 100644 --- a/wtem/models.py +++ b/wtem/models.py @@ -84,7 +84,7 @@ class Submission(models.Model): if exercise_checked_manually(exercise): marks_by_examiner = self.get_exercise_marks_by_examiner(exercise_id) if len(marks_by_examiner): - return max(map(int, marks_by_examiner.values())) + return sum(map(int, marks_by_examiner.values())) / float(len(marks_by_examiner)) else: return None else: -- 2.20.1