|
|
|
@ -15,13 +15,10 @@ class ModelCandidate
|
|
|
|
|
$id = [];
|
|
|
|
|
$answer = [];
|
|
|
|
|
$category = [];
|
|
|
|
|
|
|
|
|
|
foreach ($answersAndCategories as $answerAndCategory)
|
|
|
|
|
{
|
|
|
|
|
foreach ($answersAndCategories as $answerAndCategory) {
|
|
|
|
|
$idAndAnswer = explode("||", $answerAndCategory)[0];
|
|
|
|
|
$id[] = explode("#", $idAndAnswer)[0];
|
|
|
|
|
$answer[] = explode("#", $idAndAnswer)[1];
|
|
|
|
|
|
|
|
|
|
$categs = explode("||", $answerAndCategory)[1];
|
|
|
|
|
$categs = explode("_", $categs);
|
|
|
|
|
array_pop($categs);
|
|
|
|
@ -35,8 +32,7 @@ class ModelCandidate
|
|
|
|
|
public function getForm(): string
|
|
|
|
|
{
|
|
|
|
|
$form = (new GatewayForm())->getForm();
|
|
|
|
|
if(empty($form))
|
|
|
|
|
{
|
|
|
|
|
if (empty($form)) {
|
|
|
|
|
return "PAS DE FORMULAIRE\n";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -52,24 +48,20 @@ class ModelCandidate
|
|
|
|
|
<div id='container_form'>\n
|
|
|
|
|
<form method='post'>\n";
|
|
|
|
|
|
|
|
|
|
foreach ($questions as $question)
|
|
|
|
|
{
|
|
|
|
|
foreach ($questions as $question) {
|
|
|
|
|
$html.= $question->printStrategy()."\n";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(count($questions) > 0)
|
|
|
|
|
{
|
|
|
|
|
if (count($questions) > 0) {
|
|
|
|
|
$html.= "\t\t\t<input type='submit'>\n
|
|
|
|
|
\t\t\t<input type='hidden' name='action' value='submitForm'>
|
|
|
|
|
\t\t</form>\n
|
|
|
|
|
\t</div>\n";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
} else {
|
|
|
|
|
$html.= "\t\t</form>\n
|
|
|
|
|
\t</div>\n";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $html;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|