|
|
@ -46,7 +46,7 @@ class ModelCandidate
|
|
|
|
if( count($exploded) == 3 ){
|
|
|
|
if( count($exploded) == 3 ){
|
|
|
|
$questionsId[] = Clean::int($exploded[0]);
|
|
|
|
$questionsId[] = Clean::int($exploded[0]);
|
|
|
|
$answer[] = Clean::simpleString($exploded[1]);
|
|
|
|
$answer[] = Clean::simpleString($exploded[1]);
|
|
|
|
$categs = Clean::simpleStringArray($exploded[2]);
|
|
|
|
$categs = Clean::simpleString($exploded[2]);
|
|
|
|
$categs = explode("_", $categs);
|
|
|
|
$categs = explode("_", $categs);
|
|
|
|
array_pop($categs);
|
|
|
|
array_pop($categs);
|
|
|
|
$category[] = $categs;
|
|
|
|
$category[] = $categs;
|
|
|
@ -58,9 +58,6 @@ class ModelCandidate
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if(!Validate::answer($answer) || !Validate::category($category)){
|
|
|
|
|
|
|
|
throw new Exception("Les réponses ne sont pas valides");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$res = $this->client->request('GET', 'https://codefirst.iut.uca.fr/containers/Temoignages-deploy_api_form/getForm');
|
|
|
|
$res = $this->client->request('GET', 'https://codefirst.iut.uca.fr/containers/Temoignages-deploy_api_form/getForm');
|
|
|
|
if ($res->getStatusCode()!=200){
|
|
|
|
if ($res->getStatusCode()!=200){
|
|
|
|
throw new Exception('GetForm failed');
|
|
|
|
throw new Exception('GetForm failed');
|
|
|
|