2015-10-23 11:08:33 +00:00
|
|
|
<?php define('__ROOT__', dirname(__FILE__) );
|
2015-10-28 17:08:12 +00:00
|
|
|
require_once __ROOT__.'/manager/security.php';
|
2015-10-22 16:55:26 +00:00
|
|
|
|
2015-11-02 11:20:01 +00:00
|
|
|
/***************/
|
|
|
|
/*** 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
|
|
|
|
|
|
|
|
/***************/
|
|
|
|
/***************/
|
|
|
|
/***************/
|
|
|
|
|
2015-10-22 19:19:52 +00:00
|
|
|
/*** CRÉATION D'UTILISATEUR ***/
|
|
|
|
|
|
|
|
// require('manager/user.php');
|
2015-10-28 17:08:12 +00:00
|
|
|
// debug();
|
2015-10-22 19:19:52 +00:00
|
|
|
|
|
|
|
// $request = new stdClass();
|
|
|
|
// $answer = new stdClass();
|
|
|
|
|
|
|
|
// $request->level_1 = 'create';
|
2015-10-28 17:08:12 +00:00
|
|
|
// $request->identifiant = 'fvg1856a';
|
2015-10-23 11:08:33 +00:00
|
|
|
// $request->prenom = 'guillaume';
|
|
|
|
// $request->nom = 'fauvet';
|
2015-10-28 17:08:12 +00:00
|
|
|
// $request->mail = 'guillaume.fauvet@etu.iut-tlse3.fr';
|
|
|
|
// $request->mdp = ' Test_Password _';
|
2015-10-22 19:19:52 +00:00
|
|
|
// $request->droits = 'student';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// user_switch_level_1($request, $answer);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// echo var_dump( $answer );
|
|
|
|
|
2015-10-23 08:04:26 +00:00
|
|
|
// echo '<br><br><br><br><br><br><br>It works !';
|
2015-10-22 19:19:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-11 00:06:24 +00:00
|
|
|
require_once __ROOT__.'/manager/database.php';
|
2015-10-22 19:19:52 +00:00
|
|
|
|
2015-11-11 00:06:24 +00:00
|
|
|
debug();
|
2015-11-13 16:24:58 +00:00
|
|
|
$_SESSION['semestre_pair'] = !$_SESSION['semestre_pair'];
|
|
|
|
var_dump( $_SESSION['semestre_pair'] );
|
2015-11-10 09:50:43 +00:00
|
|
|
|
2015-11-11 21:54:52 +00:00
|
|
|
// on affiche les modules d'un étudiant
|
2015-11-13 16:24:58 +00:00
|
|
|
// var_dump( DataBase::getInstance()->getModulesByUEByEtudiant(
|
|
|
|
// $_SESSION['identifiant'],
|
|
|
|
// $_SESSION['semestre'],
|
|
|
|
// $_SESSION['annee']
|
|
|
|
// ) );
|
2015-11-12 10:19:58 +00:00
|
|
|
|
|
|
|
|
2015-11-13 16:24:58 +00:00
|
|
|
// // on affiche les controle d'un étudiant pour un module, semestre particulier
|
|
|
|
// $UEList = ueRepo::forStudent($_SESSION['identifiant'], $_SESSION['semestre']);
|
2015-11-12 10:19:58 +00:00
|
|
|
|
2015-11-13 16:24:58 +00:00
|
|
|
// foreach($UEList as $iter_ue=>$a){
|
|
|
|
// $UEList[$iter_ue]['modules'] = moduleRepo::forStudent($UEList[$iter_ue]['id'], $UEList[$iter_ue]['id_semestre']);
|
2015-11-12 10:19:58 +00:00
|
|
|
|
2015-11-13 16:24:58 +00:00
|
|
|
// 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']);
|
2015-11-12 10:19:58 +00:00
|
|
|
|
2015-11-13 16:24:58 +00:00
|
|
|
// 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']);
|
|
|
|
// }
|
2015-11-12 10:19:58 +00:00
|
|
|
|
2015-11-13 16:24:58 +00:00
|
|
|
// }
|
|
|
|
// var_dump( $UEList[0]['modules'][0]['controles'][0] );
|
2015-11-10 09:50:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** RETOURNE LE SEMESTRE COURANT D'UN ETUDIANT ***/
|
2015-11-10 09:56:43 +00:00
|
|
|
// require_once __ROOT__.'/manager/groups.php';
|
2015-11-10 09:50:43 +00:00
|
|
|
|
2015-11-10 09:56:43 +00:00
|
|
|
// $request = new stdClass();
|
|
|
|
// $answer = new stdClass();
|
2015-11-10 09:50:43 +00:00
|
|
|
|
|
|
|
|
2015-11-10 09:56:43 +00:00
|
|
|
// $request->level_1 = 'getSemestre';
|
|
|
|
// $request->etudiant = 'mrd1609a';
|
2015-11-10 09:50:43 +00:00
|
|
|
|
2015-11-10 09:56:43 +00:00
|
|
|
// groups_switch_level_1($request, $answer);
|
2015-11-10 09:50:43 +00:00
|
|
|
|
2015-11-10 09:56:43 +00:00
|
|
|
// echo var_dump( $answer );
|
2015-11-10 09:50:43 +00:00
|
|
|
|
2015-11-10 09:56:43 +00:00
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
2015-11-10 09:50:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-22 19:19:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** CRÉATION GROUPE ***/
|
2015-10-28 17:08:12 +00:00
|
|
|
// require_once __ROOT__.'/manager/groups.php';
|
2015-10-22 19:19:52 +00:00
|
|
|
|
|
|
|
// $request = new stdClass();
|
|
|
|
// $answer = new stdClass();
|
|
|
|
|
|
|
|
// $request->level_1 = 'create';
|
2015-10-28 17:08:12 +00:00
|
|
|
// $request->nom = 'S4C';
|
2015-10-22 19:19:52 +00:00
|
|
|
|
|
|
|
// groups_switch_level_1($request, $answer);
|
|
|
|
|
|
|
|
// echo var_dump( $answer );
|
|
|
|
|
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
|
|
|
|
2015-11-10 09:50:43 +00:00
|
|
|
|
2015-10-22 19:19:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-22 16:55:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-22 19:19:52 +00:00
|
|
|
/*** AJOUT D'UN UTILISATEUR À UN GROUPE ***/
|
2015-10-23 11:08:33 +00:00
|
|
|
|
|
|
|
// require __ROOT__.'/manager/groups.php';
|
2015-10-22 19:19:52 +00:00
|
|
|
|
2015-10-28 17:08:12 +00:00
|
|
|
|
2015-10-22 19:19:52 +00:00
|
|
|
// $request = new stdClass();
|
|
|
|
// $answer = new stdClass();
|
|
|
|
|
2015-10-28 17:08:12 +00:00
|
|
|
// $request->level_1 = 'add';
|
|
|
|
// $request->etudiant = 'fvg1856a'; // utilisateur.identifiant
|
|
|
|
// $request->groupe = 'S3A'; // groupe.nom
|
|
|
|
// $request->semestre = '3'; // semestre.rang
|
|
|
|
// $request->annee = '2015'; // semestre.annee
|
2015-10-22 19:19:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
// groups_switch_level_1($request, $answer);
|
|
|
|
|
|
|
|
// echo var_dump( $answer );
|
|
|
|
|
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-28 17:08:12 +00:00
|
|
|
/*** 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 !";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-06 13:05:14 +00:00
|
|
|
// /*** 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 ***/
|
|
|
|
|
2015-11-06 22:00:08 +00:00
|
|
|
// require __ROOT__.'/manager/groups.php';
|
2015-11-06 13:05:14 +00:00
|
|
|
|
2015-11-06 22:00:08 +00:00
|
|
|
// $request = new stdClass();
|
|
|
|
// $answer = new stdClass();
|
2015-11-06 13:05:14 +00:00
|
|
|
|
2015-11-06 22:00:08 +00:00
|
|
|
// $request->level_1 = 'grouplistForYear';
|
|
|
|
// $request->semestre = '3'; // groupe.nom // OPTIONNEL
|
|
|
|
// $request->annee = '2015'; // annee
|
|
|
|
// // $request->groupe = 'S3A'; // OPTIONNEL
|
2015-11-06 13:05:14 +00:00
|
|
|
|
2015-11-06 22:00:08 +00:00
|
|
|
// groups_switch_level_1($request, $answer);
|
2015-11-06 13:05:14 +00:00
|
|
|
|
2015-11-06 22:00:08 +00:00
|
|
|
// var_dump( $answer );
|
2015-10-28 17:08:12 +00:00
|
|
|
|
2015-11-06 22:00:08 +00:00
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
2015-10-28 17:08:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-22 19:19:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*** AFFICHER LES MEMBRES D'UN GROUPE ***/
|
|
|
|
|
2015-10-22 21:06:25 +00:00
|
|
|
// require('manager/groups.php');
|
2015-10-22 19:19:52 +00:00
|
|
|
|
2015-10-22 21:06:25 +00:00
|
|
|
// $request = new stdClass();
|
|
|
|
// $answer = new stdClass();
|
2015-10-22 19:19:52 +00:00
|
|
|
|
2015-10-28 17:08:12 +00:00
|
|
|
// $request->level_1 = 'userlist';
|
|
|
|
// $request->groupe = 'S3A'; // groupe.nom
|
|
|
|
// $request->semestre = '3'; // semestre.rang
|
|
|
|
// $request->annee = '2015'; // semestre.annee
|
2015-10-22 19:19:52 +00:00
|
|
|
|
|
|
|
|
2015-10-22 21:06:25 +00:00
|
|
|
// groups_switch_level_1($request, $answer);
|
2015-10-22 19:19:52 +00:00
|
|
|
|
2015-10-22 21:06:25 +00:00
|
|
|
// echo var_dump( $answer );
|
2015-10-22 16:55:26 +00:00
|
|
|
|
2015-10-22 21:06:25 +00:00
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
2015-10-22 16:55:26 +00:00
|
|
|
|
2015-10-22 19:19:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-23 08:04:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-28 22:33:16 +00:00
|
|
|
/*** AFFICHER LES MEMBRES DE TOUS LES GROUPES (d'un semestre particulier) ***/
|
2015-10-23 08:04:26 +00:00
|
|
|
|
2015-11-06 10:13:32 +00:00
|
|
|
// require('manager/groups.php');
|
2015-10-23 08:04:26 +00:00
|
|
|
|
2015-11-06 10:13:32 +00:00
|
|
|
// $request = new stdClass();
|
|
|
|
// $answer = new stdClass();
|
2015-10-23 08:04:26 +00:00
|
|
|
|
2015-11-06 10:13:32 +00:00
|
|
|
// $request->level_1 = 'grouplist';
|
|
|
|
// $request->semestre = '3';
|
|
|
|
// $request->annee = '2015';
|
2015-10-23 08:04:26 +00:00
|
|
|
|
2015-11-06 10:13:32 +00:00
|
|
|
// groups_switch_level_1($request, $answer);
|
2015-10-23 08:56:22 +00:00
|
|
|
|
2015-11-06 10:13:32 +00:00
|
|
|
// 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>';
|
|
|
|
// }
|
|
|
|
// }
|
2015-10-23 08:04:26 +00:00
|
|
|
|
2015-11-06 10:13:32 +00:00
|
|
|
// echo "<br><br><br><br><br><br><br>It works !";
|
2015-10-23 08:04:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-22 16:55:26 +00:00
|
|
|
?>
|