diff --git a/libs/bulletin/Matiere.lib.php b/libs/bulletin/Matiere.lib.php index ba5d9a8..29327b5 100644 --- a/libs/bulletin/Matiere.lib.php +++ b/libs/bulletin/Matiere.lib.php @@ -41,7 +41,7 @@ class Matiere { $total = 0; $totalCoef = 0.0; foreach ($this->notes as $note) { - $total += $note->getNote() * $note->getCoef(); + $total += $note->getNoteOn20() * $note->getCoef(); $totalCoef += $note->getCoef(); } return $total / $totalCoef; diff --git a/libs/bulletin/Note.lib.php b/libs/bulletin/Note.lib.php index 3cf7b5e..ac0a4c0 100644 --- a/libs/bulletin/Note.lib.php +++ b/libs/bulletin/Note.lib.php @@ -23,6 +23,10 @@ class Note { return $this->note; } + public function getNoteOn20() { + return ($this->note / $this->max) * 20; + } + public function getCoef() { return $this->coef; } diff --git a/templates/eleve_notes.twig b/templates/eleve_notes.twig index 20c342b..aa048ca 100644 --- a/templates/eleve_notes.twig +++ b/templates/eleve_notes.twig @@ -7,7 +7,7 @@