Final mark as an average from individual marks
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 20 Nov 2013 15:37:51 +0000 (16:37 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 15 Jan 2014 10:28:04 +0000 (11:28 +0100)
wtem/models.py

index d24430d..4c3d0ee 100644 (file)
@@ -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: