346 lines
6.6 KiB
PHP
Executable File
346 lines
6.6 KiB
PHP
Executable File
<?php define('__ROOT__', dirname(__FILE__) );
|
|
require_once __ROOT__.'/manager/security.php';
|
|
|
|
/***************/
|
|
/*** A FAIRE ***/
|
|
/***************
|
|
|
|
[ ] Lors du déplacement par drag'n'drop, déplacer l'élève au bon endroit (classé alphabétiquement)
|
|
[ ] Refaire le design des tableaux en utilisant xdoc/flat_table_design.jpg
|
|
|
|
/***************/
|
|
/***************/
|
|
/***************/
|
|
|
|
/*** CRÉATION D'UTILISATEUR ***/
|
|
|
|
// require('manager/user.php');
|
|
// debug();
|
|
|
|
// $request = new stdClass();
|
|
// $answer = new stdClass();
|
|
|
|
// $request->level_1 = 'create';
|
|
// $request->identifiant = 'fvg1856a';
|
|
// $request->prenom = 'guillaume';
|
|
// $request->nom = 'fauvet';
|
|
// $request->mail = 'guillaume.fauvet@etu.iut-tlse3.fr';
|
|
// $request->mdp = ' Test_Password _';
|
|
// $request->droits = 'student';
|
|
|
|
|
|
|
|
// user_switch_level_1($request, $answer);
|
|
|
|
|
|
|
|
// echo var_dump( $answer );
|
|
|
|
// echo '<br><br><br><br><br><br><br>It works !';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
debug();
|
|
require_once __ROOT__.'/manager/user.php';
|
|
|
|
// $request = new stdClass(); $answer = new stdClass();
|
|
// $request->level_1 = 'updateRole';
|
|
// $request->identifiant = 'admin';
|
|
// $request->admin = null;
|
|
// $request->master = null;
|
|
// $request->addModule = null;
|
|
// $request->delModule = 42;
|
|
|
|
// user_switch_level_1($request, $answer);
|
|
|
|
// var_dump( $answer );
|
|
|
|
|
|
|
|
// $_SESSION['semestre_pair'] = !$_SESSION['semestre_pair'];
|
|
// var_dump( $_SESSION['semestre_pair'] );
|
|
|
|
// var_dump( utf8_decode( utf8_decode('Introduction aux systèmes informatiques')) );
|
|
|
|
// on affiche les modules d'un étudiant
|
|
// var_dump( DataBase::getInstance()->getModulesByUEByEtudiant(
|
|
// $_SESSION['identifiant'],
|
|
// $_SESSION['semestre'],
|
|
// $_SESSION['annee']
|
|
// ) );
|
|
|
|
|
|
// // on affiche les controle d'un étudiant pour un module, semestre particulier
|
|
// $UEList = ueRepo::forStudent($_SESSION['identifiant'], $_SESSION['semestre']);
|
|
|
|
// foreach($UEList as $iter_ue=>$a){
|
|
// $UEList[$iter_ue]['modules'] = moduleRepo::forStudent($UEList[$iter_ue]['id'], $UEList[$iter_ue]['id_semestre']);
|
|
|
|
// foreach($UEList[$iter_ue]['modules'] as $iter_mod=>$b){
|
|
// $UEList[$iter_ue]['modules'][$iter_mod]['controles'] = controleRepo::forStudent($UEList[$iter_ue]['modules'][$iter_mod]['id'], $UEList[$iter_ue]['id_semestre']);
|
|
|
|
// foreach($UEList[$iter_ue]['modules'][$iter_mod]['controles'] as $iter_ct=>$c)
|
|
// $UEList[$iter_ue]['modules'][$iter_mod]['controles'][$iter_ct]['notes'] = noteRepo::forStudent($_SESSION['identifiant'], $UEList[$iter_ue]['modules'][$iter_mod]['controles'][$iter_ct]['id']);
|
|
// }
|
|
|
|
// }
|
|
// var_dump( $UEList[0]['modules'][0]['controles'][0] );
|
|
|
|
|
|
|
|
|
|
|
|
/*** RETOURNE LE SEMESTRE COURANT D'UN ETUDIANT ***/
|
|
// require_once __ROOT__.'/manager/groups.php';
|
|
|
|
// $request = new stdClass();
|
|
// $answer = new stdClass();
|
|
|
|
|
|
// $request->level_1 = 'getSemestre';
|
|
// $request->etudiant = 'mrd1609a';
|
|
|
|
// groups_switch_level_1($request, $answer);
|
|
|
|
// echo var_dump( $answer );
|
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** CRÉATION GROUPE ***/
|
|
// require_once __ROOT__.'/manager/groups.php';
|
|
|
|
// $request = new stdClass();
|
|
// $answer = new stdClass();
|
|
|
|
// $request->level_1 = 'create';
|
|
// $request->nom = 'S4C';
|
|
|
|
// groups_switch_level_1($request, $answer);
|
|
|
|
// echo var_dump( $answer );
|
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** AJOUT D'UN UTILISATEUR À UN GROUPE ***/
|
|
|
|
// require __ROOT__.'/manager/groups.php';
|
|
|
|
|
|
// $request = new stdClass();
|
|
// $answer = new stdClass();
|
|
|
|
// $request->level_1 = 'add';
|
|
// $request->etudiant = 'fvg1856a'; // utilisateur.identifiant
|
|
// $request->groupe = 'S3A'; // groupe.nom
|
|
// $request->semestre = '3'; // semestre.rang
|
|
// $request->annee = '2015'; // semestre.annee
|
|
|
|
|
|
// groups_switch_level_1($request, $answer);
|
|
|
|
// echo var_dump( $answer );
|
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** AFFICHER LE GROUPE D'UN ETUDIANT ***/
|
|
|
|
// require __ROOT__.'/manager/groups.php';
|
|
|
|
// $request = new stdClass();
|
|
// $answer = new stdClass();
|
|
|
|
// $request->level_1 = 'get';
|
|
// $request->etudiant = 'ihf1991a'; // utilisateur.identifiant
|
|
// $request->semestre = '3'; // groupe.nom
|
|
// $request->annee = '2015'; // groupe.nom
|
|
|
|
|
|
// groups_switch_level_1($request, $answer);
|
|
|
|
// echo var_dump( $answer );
|
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// /*** AFFICHER LE GROUPE D'UN ENSEIGNANT ***/
|
|
|
|
// require __ROOT__.'/manager/groups.php';
|
|
|
|
// $request = new stdClass();
|
|
// $answer = new stdClass();
|
|
|
|
// $request->level_1 = 'grouplistForTeacher';
|
|
// $request->enseignant = 'lbh1609a'; // utilisateur.identifiant
|
|
// // $request->semestre = '3'; // groupe.nom
|
|
// $request->annee = '2015'; // groupe.nom
|
|
// // $request->groupe = 'S1A';
|
|
|
|
// groups_switch_level_1($request, $answer);
|
|
|
|
// var_dump( $answer );
|
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
|
|
|
|
|
|
|
/*** AFFICHER LES GROUPES D'UNE ANNEE ***/
|
|
|
|
// require __ROOT__.'/manager/groups.php';
|
|
|
|
// $request = new stdClass();
|
|
// $answer = new stdClass();
|
|
|
|
// $request->level_1 = 'grouplistForYear';
|
|
// $request->semestre = '3'; // groupe.nom // OPTIONNEL
|
|
// $request->annee = '2015'; // annee
|
|
// // $request->groupe = 'S3A'; // OPTIONNEL
|
|
|
|
// groups_switch_level_1($request, $answer);
|
|
|
|
// var_dump( $answer );
|
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** AFFICHER LES MEMBRES D'UN GROUPE ***/
|
|
|
|
// require('manager/groups.php');
|
|
|
|
// $request = new stdClass();
|
|
// $answer = new stdClass();
|
|
|
|
// $request->level_1 = 'userlist';
|
|
// $request->groupe = 'S3A'; // groupe.nom
|
|
// $request->semestre = '3'; // semestre.rang
|
|
// $request->annee = '2015'; // semestre.annee
|
|
|
|
|
|
// groups_switch_level_1($request, $answer);
|
|
|
|
// echo var_dump( $answer );
|
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** AFFICHER LES MEMBRES DE TOUS LES GROUPES (d'un semestre particulier) ***/
|
|
|
|
// require('manager/groups.php');
|
|
|
|
// $request = new stdClass();
|
|
// $answer = new stdClass();
|
|
|
|
// $request->level_1 = 'grouplist';
|
|
// $request->semestre = '3';
|
|
// $request->annee = '2015';
|
|
|
|
// groups_switch_level_1($request, $answer);
|
|
|
|
// var_dump( $answer );
|
|
// echo '<br><br><br><br>';
|
|
|
|
// foreach($answer->grouplist as $group){
|
|
// echo "<br><br>================";
|
|
// echo "<br>=== GROUPE ".$group->nom." ===<br>";
|
|
// echo "================<br>";
|
|
// foreach($group as $userlist)
|
|
// foreach($userlist as $user){
|
|
// foreach($user as $key=>$value)
|
|
// echo $key.' = '.$value.' | ';
|
|
// echo '<br>';
|
|
// }
|
|
// }
|
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?>
|