le quiz marche avec l'autoloader maintenant

php
Patrick BRUGIERE 1 year ago
parent 8ea6de1dbd
commit 58aefe864e

@ -92,10 +92,10 @@ abstract class AbsController
throw new Exception("Erreur"); throw new Exception("Erreur");
} }
} }
public function quiz(): void public function quiz($match): void
{ {
global $twig; global $twig;
$vocabId = $_GET['vocabID']; $vocabId = Validation::filter_int($match['params']['id'] ?? null);
$mdl = new TranslationGateway(); $mdl = new TranslationGateway();
$allTranslation = $mdl->findByIdVoc($vocabId); $allTranslation = $mdl->findByIdVoc($vocabId);
$shuffle = $allTranslation; $shuffle = $allTranslation;

@ -56,7 +56,7 @@ class FrontController
$this->disconnect(); $this->disconnect();
break; break;
case 'quiz': case 'quiz':
AbsController::quiz(); AbsController::quiz($match);
break; break;
default : default :

Loading…
Cancel
Save