|
|
@ -97,6 +97,8 @@ class AbsController
|
|
|
|
{
|
|
|
|
{
|
|
|
|
global $twig;
|
|
|
|
global $twig;
|
|
|
|
$vocabId = Validation::filter_int($match['id'] ?? null);
|
|
|
|
$vocabId = Validation::filter_int($match['id'] ?? null);
|
|
|
|
|
|
|
|
$vocabList = (new VocabularyListGateway())->findById($vocabId) ?? null;
|
|
|
|
|
|
|
|
if ($vocabList == null) throw new Exception("liste inconnue");
|
|
|
|
$mdl = new TranslationGateway();
|
|
|
|
$mdl = new TranslationGateway();
|
|
|
|
$allTranslation = $mdl->findByIdVoc($vocabId);
|
|
|
|
$allTranslation = $mdl->findByIdVoc($vocabId);
|
|
|
|
$shuffle = $allTranslation;
|
|
|
|
$shuffle = $allTranslation;
|
|
|
@ -127,7 +129,7 @@ class AbsController
|
|
|
|
$answers[] = $tab;
|
|
|
|
$answers[] = $tab;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
echo $twig->render('quizView.html', ['questions' => $questions, 'answers' => $answers, 'goodAnswers' => $goodAnswers]);
|
|
|
|
echo $twig->render('quizView.html', ['questions' => $questions, 'answers' => $answers, 'goodAnswers' => $goodAnswers, 'listName' => $vocabList->getName()]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function login(): void {
|
|
|
|
public function login(): void {
|
|
|
|