fix : probleme page blanche
continuous-integration/drone/push Build is passing Details

pull/37/head
Maxence GUITARD 1 year ago
parent 6ddf62bea5
commit 30e1e91471

@ -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,
]);
}
}

@ -1,5 +1,10 @@
<?php
namespace gateways;
use usages\Connection;
use \PDO;
class GatewayJouer
{
private $con;

@ -3,6 +3,7 @@
namespace models;
use gateways\GatewayPlayer;
use gateways\GatewayJouer;
use classes\Player;
class ModelPlayer

@ -1,6 +1,5 @@
<!DOCTYPE html>
<html lang="fr">
<html>
<head>
<meta charset=utf-8>

@ -12,11 +12,6 @@
</head>
<body id="bodyStyle">
<div class="mt-5 border border-1 border-black p-3 bg-success text-white d-flex flex-column align-items-center fs-5">
<p>🏆 Score : 🏆</p>
<p> {{ numScore }} </p>
<p>{{ score }}</p>
</div>
<canvas id="confetti"></canvas>
<div class="mb-3 border border-1 border-black bg-success p-2 text-white fs-3">

Loading…
Cancel
Save