From af0fe2fe0d858bc0f5a2c25b7872989250fa9e45 Mon Sep 17 00:00:00 2001 From: Alexis Date: Tue, 28 Feb 2023 18:50:55 +0100 Subject: [PATCH] Print responses and categories into Admin Page without CSS --- Source/API/script/Gateway/GatewayForm.php | 2 +- Source/API/script/Gateway/GatewayListResponseOfCandidate.php | 2 +- Source/Controller/ControllerAdmin.php | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/API/script/Gateway/GatewayForm.php b/Source/API/script/Gateway/GatewayForm.php index 788f825..73c18f3 100644 --- a/Source/API/script/Gateway/GatewayForm.php +++ b/Source/API/script/Gateway/GatewayForm.php @@ -55,7 +55,7 @@ class GatewayForm $query = "SELECT * FROM Form"; $this->connection->executeQuery($query); - var_dump($this->connection->getResults()); + return $this->connection->getResults(); } /** diff --git a/Source/API/script/Gateway/GatewayListResponseOfCandidate.php b/Source/API/script/Gateway/GatewayListResponseOfCandidate.php index 7862ea0..f033b69 100644 --- a/Source/API/script/Gateway/GatewayListResponseOfCandidate.php +++ b/Source/API/script/Gateway/GatewayListResponseOfCandidate.php @@ -78,7 +78,7 @@ class GatewayListResponseOfCandidate $query = "INSERT INTO Submit (responsesCandidate, response) VALUES(:responsesCandidate, :response)"; $this->connection->executeQuery($query, array( ':responsesCandidate' => array($idListQuestion, PDO::PARAM_STR), - 'response' => array($idResponse, PDO::PARAM_STR) + ':response' => array($idResponse, PDO::PARAM_STR) )); } } diff --git a/Source/Controller/ControllerAdmin.php b/Source/Controller/ControllerAdmin.php index 2e349a5..a2001b2 100644 --- a/Source/Controller/ControllerAdmin.php +++ b/Source/Controller/ControllerAdmin.php @@ -95,6 +95,8 @@ class ControllerAdmin $questions = (new ModelAdmin())->getQuestions(); $responsesCandidate = (new ModelAdmin())->getResponsesCandidate(); + var_dump($responsesCandidate); + global $rep, $views; require_once($rep.$views['admin']); }