|
|
@ -7,19 +7,10 @@ use Model\ModelAdmin;
|
|
|
|
class ControllerAdmin
|
|
|
|
class ControllerAdmin
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public function addQuestion(): void
|
|
|
|
public function addQuestion(): void
|
|
|
|
{
|
|
|
|
|
|
|
|
$idQuestion = (new ModelAdmin())->addQuestion();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($idQuestion != -1)
|
|
|
|
|
|
|
|
$_POST['idQuestion'] = $idQuestion;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
$_POST['idQuestion'] = null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function chooseQuestionAndType(): void
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
global $rep, $views;
|
|
|
|
global $rep, $views;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$idQuestion = (new ModelAdmin())->addQuestion();
|
|
|
|
$categories = (new ModelAdmin())->getCategories();
|
|
|
|
$categories = (new ModelAdmin())->getCategories();
|
|
|
|
$questionContent = $_POST['question'];
|
|
|
|
$questionContent = $_POST['question'];
|
|
|
|
$type = $_POST['type'];
|
|
|
|
$type = $_POST['type'];
|
|
|
@ -27,6 +18,11 @@ class ControllerAdmin
|
|
|
|
require_once($rep.$views['possibleResponsesForm']);
|
|
|
|
require_once($rep.$views['possibleResponsesForm']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function addResponse(): void
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function createForm(): void
|
|
|
|
public function createForm(): void
|
|
|
|
{
|
|
|
|
{
|
|
|
|
(new ModelAdmin())->createForm();
|
|
|
|
(new ModelAdmin())->createForm();
|
|
|
|