diff --git a/Website/controllers/ControllerUser.php b/Website/controllers/ControllerUser.php index 37d397f..ab5e737 100644 --- a/Website/controllers/ControllerUser.php +++ b/Website/controllers/ControllerUser.php @@ -138,8 +138,8 @@ class ControllerUser { $_SESSION["Score"] = 0; $difficulty = $_POST['difficulty']; - $_SESSION['chapter'] = $_POST['chapter']; - + $chapter = $_POST['chapter']; + $_SESSION['id_chapter'] = $_POST['chapter']; $difficultyIsOk = TRUE; $chapterIsOk = TRUE; @@ -153,7 +153,7 @@ class ControllerUser if ($difficultyIsOk and $chapterIsOk) { $_SESSION["PrevTime"] = new DateTime('now'); - $_SESSION["Questions"] = $this->mdQuestion->getQuestionsByChapterAndDifficulty($_SESSION['chapter'], $difficulty); + $_SESSION["Questions"] = $this->mdQuestion->getQuestionsByChapterAndDifficulty($chapter, $difficulty); $_SESSION["Answers"] = array(); foreach ($_SESSION["Questions"] as $question) { $answers = $this->mdAnswer->getAnswersByIDQuestions($question->getId()); @@ -229,12 +229,13 @@ class ControllerUser $Final[$c]["PlayerAnswer"] = $answer; $c = $c + 1; } - $idPlayer = $_SESSION["idPlayerConnected"]; - $idChapter = $_SESSION["chapter"]; + // $idPlayer = $_SESSION["idPlayerConnected"]; + // $idChapter = $_SESSION["chapter"]; + // $numScore = $this->mdPlayer->getJouerByPlayerAndChapter( $idPlayer, $idChapter); echo $this->twig->render($this->vues["viewScore"], [ 'score' => $_SESSION["Score"], 'Final' => $Final, - 'numScore' => $this->mdPlayer->getJouerByPlayerAndChapter( $idPlayer, $idChapter), + // 'numScore' => $numScore, ]); } } diff --git a/Website/gateways/GatewayJouer.php b/Website/gateways/GatewayJouer.php index 7465cf1..151be1d 100644 --- a/Website/gateways/GatewayJouer.php +++ b/Website/gateways/GatewayJouer.php @@ -1,5 +1,10 @@ -
diff --git a/Website/templates/viewScore.twig b/Website/templates/viewScore.twig index edea8ce..61d0a27 100644 --- a/Website/templates/viewScore.twig +++ b/Website/templates/viewScore.twig @@ -12,11 +12,6 @@ -🏆 Score : 🏆
-{{ numScore }}
-{{ score }}
-