diff --git a/Project/php/controller/StudentController.php b/Project/php/controller/StudentController.php index 30f09bb..aef6772 100755 --- a/Project/php/controller/StudentController.php +++ b/Project/php/controller/StudentController.php @@ -8,5 +8,39 @@ use Exception; class StudentController extends UserController { + public function affAllVocab(): void + { + global $twig; + $mdl = new MdlStudent(); + $voc = $mdl->getAll(); + echo $twig->render('manageVocabListView.html', ['vocabularies' => $voc]); + } + + + public function affAllStudent(): void + { + global $twig; + $mdl = new MdlStudent(); + $student = $mdl->getAll(); + echo $twig->render('usersView.html', ['users' => $student]); + + } + + public function getByName(): void + { + global $twig; + $mdl = new MdlStudent(); + $name = Validation::filter_str_simple($_GET['listName'] ?? null); + $vocab = $mdl->getVocabByName($name); + echo $twig->render('manageVocabView.html', ['vocabularies' => $vocab]); + } + + public function memoryChoice(): void { + global $twig; + global $user; + $model = new MdlStudent(); + $voc = $model->getAll(); + echo $twig->render('vocabList.html', ['vocabularies' => $voc, 'userID' => $user->getId(), 'userRole' => $user->getRoles()]); + } } \ No newline at end of file diff --git a/Project/php/css/memory.css b/Project/php/css/memory.css index 3a2ce94..2fbef9a 100755 --- a/Project/php/css/memory.css +++ b/Project/php/css/memory.css @@ -2,9 +2,9 @@ body { display: flex; justify-content: center; align-items: center; - height: 90vh; + height: 90%; background-color: #acc2c2; - margin: 2vh 15vh; + margin: 2% 15%; overflow: hidden; } @@ -36,7 +36,7 @@ h1{ cursor: pointer; transition: transform 0.6s ease; transform-style: preserve-3d; - min-height: 5vh; + min-height: 5%; max-width: 100%; aspect-ratio: 1/1; } diff --git a/Project/php/templates/navBar.twig b/Project/php/templates/navBar.twig index 6a96ecf..73a12af 100755 --- a/Project/php/templates/navBar.twig +++ b/Project/php/templates/navBar.twig @@ -16,7 +16,7 @@ {% endif %} {% if 'student' in userRole%} - + {% endif %} diff --git a/Project/php/templates/vocabList.html b/Project/php/templates/vocabList.html new file mode 100755 index 0000000..1aeea61 --- /dev/null +++ b/Project/php/templates/vocabList.html @@ -0,0 +1,28 @@ + + + + + Users + + + + + +{% include 'navBar.twig' %} +{% if vocabulary is defined %} +
+
+ + + {% for row in vocabularies %} + + {% endfor %} + +
+ +
+
+
+{% endif %} + + \ No newline at end of file