|
|
|
@ -43,10 +43,11 @@ class ControllerAdmin
|
|
|
|
|
* Supprime une question par son id récupéré par le tableau $_POST ainsi que les possibles réponses associées
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
public function deleteQuestion(): void
|
|
|
|
|
{
|
|
|
|
|
(new ModelAdmin())->deleteQuestion();
|
|
|
|
|
(new ModelAdmin)->deleteQuestion();
|
|
|
|
|
$this->goToQuestions();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -75,10 +76,11 @@ class ControllerAdmin
|
|
|
|
|
* Permet de supprimer une possible réponse par son id récupéré par le tableau $_POST
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
public function deleteResponse(): void
|
|
|
|
|
{
|
|
|
|
|
(new ModelAdmin())->deleteResponse();
|
|
|
|
|
(new ModelAdmin)->deleteResponse();
|
|
|
|
|
$this->goToQuestions();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -137,10 +139,11 @@ class ControllerAdmin
|
|
|
|
|
* Permet de supprimer un mot clef qui sera récupéré par le tableau $_POST
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
public function deleteKeyword(): void
|
|
|
|
|
{
|
|
|
|
|
(new ModelAdmin())->deleteKeyword();
|
|
|
|
|
(new ModelAdmin)->deleteKeyword();
|
|
|
|
|
$this->goToCategories();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -152,7 +155,7 @@ class ControllerAdmin
|
|
|
|
|
*/
|
|
|
|
|
public function goToCategories(): void
|
|
|
|
|
{
|
|
|
|
|
$categories = (new ModelAdmin())->getCategories();
|
|
|
|
|
$categories = (new ModelAdmin)->getCategories();
|
|
|
|
|
global $rep, $views;
|
|
|
|
|
require_once($rep.$views['categories']);
|
|
|
|
|
}
|
|
|
|
@ -179,7 +182,7 @@ class ControllerAdmin
|
|
|
|
|
*/
|
|
|
|
|
public function goToResponses(): void
|
|
|
|
|
{
|
|
|
|
|
$responsesCandidate = (new ModelAdmin())->getResponsesCandidate();
|
|
|
|
|
$responsesCandidate = (new ModelAdmin)->getResponsesCandidate();
|
|
|
|
|
global $rep, $views;
|
|
|
|
|
require_once($rep.$views['responses']);
|
|
|
|
|
}
|
|
|
|
@ -190,9 +193,12 @@ class ControllerAdmin
|
|
|
|
|
require_once($rep.$views['admin']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
public function deleteResponsesCandidate(): void
|
|
|
|
|
{
|
|
|
|
|
(new ModelAdmin())->deleteResponsesCandidate();
|
|
|
|
|
(new ModelAdmin)->deleteResponsesCandidate();
|
|
|
|
|
$this->goToResponses();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|