diff --git a/Project/php/controller/StudentController.php b/Project/php/controller/StudentController.php index a218a5f..05a77be 100755 --- a/Project/php/controller/StudentController.php +++ b/Project/php/controller/StudentController.php @@ -2,8 +2,11 @@ namespace controller; use config\Validation; +use gateway\TranslationGateway; +use gateway\VocabularyListGateway; use model\MdlStudent; use Exception; +use model\Translation; class StudentController { @@ -82,4 +85,21 @@ class StudentController throw new Exception("invalid entries"); } } + public function quiz(): void { + global $twig; + $vocabId = $_GET['vocabID']; + $mdl = new TranslationGateway(); + $allTranslation = $mdl->findByIdVoc($vocabId); + echo $twig->render('quizzView.html', ['translations' => $allTranslation ]); + } +/* + public function flashcard(VocabularyList $v) { + $idVoc = $v->getId(); + $mdl = new TranslationGateway(); + $allTranslation = $mdl->findByIdVoc($idVoc); + while(1) { + + } + } +*/ } \ No newline at end of file diff --git a/Project/php/templates/quizContainer.twig b/Project/php/templates/quizContainer.twig new file mode 100755 index 0000000..085b974 --- /dev/null +++ b/Project/php/templates/quizContainer.twig @@ -0,0 +1,14 @@ +
{{ row.id }} | +{{ row.word1 }} | +{{ row.word2 }} | +{{ row.listVocab }} | +