Commit 45ffd741 authored by Mikael Salson's avatar Mikael Salson
Browse files

Sujet/DefaultController.php: Modify the initial mark when we modify note_sur

Fix #12
parent 43a99bf4
......@@ -237,12 +237,14 @@ class DefaultController extends AlecsiaController {
}
if ($notesur !== "") {
$sujet->setNoteSur($notesur);
}
$noteInitiale = $sujet->getNoteInitiale();
if ($noteInitiale != 0) {
$noteInitiale = $notesur;
$noteInitiale = ($notesur / $sujet->getNoteSur()) * $noteInitiale;
$noteInitiale = $an->arrondirNotes($noteInitiale, $an::ARR_UNITE, $an::ARR_PROCHE);
$sujet->setNoteInitiale($noteInitiale);
}
if ($notesur !== "") {
$sujet->setNoteSur($notesur);
}
if ($nombreDeCran !== "") {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment