You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
860 B
37 lines
860 B
<?php
|
|
|
|
namespace controller;
|
|
use config\Validation;
|
|
use model\MdlStudent;
|
|
use Exception;
|
|
|
|
class StudentController
|
|
{
|
|
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]);
|
|
}
|
|
} |