diff --git a/Model/UserModel.php b/Model/UserModel.php index 885ad188..fa579a8d 100644 --- a/Model/UserModel.php +++ b/Model/UserModel.php @@ -306,16 +306,16 @@ class UserModel $score[] = 0; } else if ($row['classement'] == 1){ - $score[] = (int)$$this->enigme_gateway->findById($row['enigme'])[0]->getPoints(); + $score[] = $this->enigme_gateway->findById($row['enigme'])[0]->getPoints(); } else if ($row['classement'] == 2){ - $score[] = (int)$$this->enigme_gateway->findById($row['enigme'])[0]->getPoints() * 0.75; + $score[] = $this->enigme_gateway->findById($row['enigme'])[0]->getPoints() * 0.75; } else if ($row['classement'] == 3){ - $score[] = (int)$$this->enigme_gateway->findById($row['enigme'])[0]->getPoints() * 0.5; + $score[] = $this->enigme_gateway->findById($row['enigme'])[0]->getPoints() * 0.5; } else{ - $score[] = (int)$this->enigme_gateway->findById($row['enigme'])[0]->getPoints() * 0.25; + $score[] = $this->enigme_gateway->findById($row['enigme'])[0]->getPoints() * 0.25; } } return $score; diff --git a/View/src/JS/dashboard.js b/View/src/JS/dashboard.js index 772b8137..9fbb5c0d 100644 --- a/View/src/JS/dashboard.js +++ b/View/src/JS/dashboard.js @@ -14,7 +14,7 @@ v1.xValueFormatString=lesInfos[0][i]; v1.dataPoints=[]; for (j = 0; j < lesInfos[1].length; j++) { - v1.dataPoints.push({x:j+1,y:lesInfos[1][j]}); + v1.dataPoints.push({x:j+1,y:lesInfos[1][j][0]}); } data.push(v1); }