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
|
|
|
debug();
|
2015-12-06 18:42:02 +00:00
|
|
|
|
2016-01-07 20:24:43 +00:00
|
|
|
// var_dump(DataBase::getInstance()->getSemestreInfoFromTime( strtotime('2017-01-31') ));
|
|
|
|
|
2016-01-08 22:34:17 +00:00
|
|
|
// on récupère les année équivalentes (redoublées) pour un semestre
|
|
|
|
// var_dump( semestreRepo::getRedoublements(252, 'Etud100') );
|
|
|
|
|
|
|
|
// 35 = UE1,
|
|
|
|
// on veut que l'ue d'id 35 compte pour le semestre 252 et que les semestres de même rang et formation soient ignorés
|
2016-01-09 14:49:48 +00:00
|
|
|
/*******************************************************/
|
|
|
|
// $request = new stdClass; $answer = new stdClass;
|
|
|
|
// $request->level_1 = 'capitaliser';
|
|
|
|
// $request->ue = 37;
|
|
|
|
// $request->semestre = 276;
|
|
|
|
// $request->etudiant = 'Etud100';
|
|
|
|
|
|
|
|
// careerManager::switch_level_1($request, $answer);
|
|
|
|
// var_dump( $answer );
|
|
|
|
/*******************************************************/
|
|
|
|
|
|
|
|
var_dump( $_SERVER['HTTP_HOST'] );
|
2016-01-07 20:24:43 +00:00
|
|
|
// $ts = time();
|
|
|
|
// $date1 = date('Y-m-d', $ts);
|
|
|
|
// $date2 = date('Y-m-d', strtotime($date1.' - 1 year'));
|
|
|
|
// var_dump( $date1 );
|
|
|
|
// var_dump( $date2 );
|
2016-01-07 20:15:16 +00:00
|
|
|
|
|
|
|
|
2016-01-02 23:59:18 +00:00
|
|
|
/* [1] On récupère le semestre d'un étudiant
|
|
|
|
=====================================================*/
|
2016-01-04 16:48:13 +00:00
|
|
|
// var_dump( DataBase::getInstance()->applyJuryTo('Etud100', 95, 'DEM') );
|
2016-01-03 21:02:46 +00:00
|
|
|
// var_dump( DataBase::getInstance()->saisieNoteMultiple(589, array(
|
|
|
|
// [ 'etudiant' => 'Etud100', 'valeur' => '10' ],
|
|
|
|
// [ 'etudiant' => 'Etud101', 'valeur' => '10' ],
|
|
|
|
// [ 'etudiant' => 'Etud134', 'valeur' => '10' ]
|
|
|
|
// )) );
|
2015-12-06 18:42:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-06 14:05:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-29 16:00:02 +00:00
|
|
|
// $_SESSION['annee'] = 2015;
|
2015-11-25 14:13:27 +00:00
|
|
|
|
2016-01-02 13:21:31 +00:00
|
|
|
// require_once __ROOT__.'/manager/security.php';
|
2015-11-29 21:13:37 +00:00
|
|
|
|
2015-11-29 22:29:54 +00:00
|
|
|
// $_SESSION['identifiant'] = 'modele'; // afin de lire le fichier
|
2015-11-29 21:13:37 +00:00
|
|
|
|
2015-11-29 22:29:54 +00:00
|
|
|
// $r1 = new stdClass(); $a1 = new stdClass();
|
|
|
|
// $r1->level_1 = 'import_mcc';
|
2015-11-29 21:13:37 +00:00
|
|
|
|
2015-11-29 22:29:54 +00:00
|
|
|
// xlsx_switch_lvl1($r1, $a1);
|
2015-11-24 20:06:20 +00:00
|
|
|
|
2015-11-29 22:29:54 +00:00
|
|
|
// if( $a1->request == 'success' ){
|
2015-11-24 20:06:20 +00:00
|
|
|
|
2015-11-29 22:29:54 +00:00
|
|
|
// $mcc = $a1->mcc;
|
|
|
|
// $ue11 = $mcc[0]; $ue11mods = $ue11['modules'];
|
|
|
|
// $ue12 = $mcc[1]; $ue12mods = $ue12['modules'];
|
2015-11-24 23:04:02 +00:00
|
|
|
|
|
|
|
|
2015-11-29 22:29:54 +00:00
|
|
|
// var_dump( $ue11mods[0]['controles'] );
|
2015-11-24 23:04:02 +00:00
|
|
|
|
2015-11-29 22:29:54 +00:00
|
|
|
// // $r2 = new stdClass(); $a2 = new stdClass();
|
|
|
|
// // $r2->level_1 = 'addUserlist';
|
|
|
|
// // $r2->rang = 1;
|
|
|
|
// // $r2->annee = 2018;
|
|
|
|
// // $r2->formationList = $a1->formationList;
|
2015-11-24 23:04:02 +00:00
|
|
|
|
2015-11-29 22:29:54 +00:00
|
|
|
// // groups_switch_level_1($r2, $a2);
|
2015-11-24 23:04:02 +00:00
|
|
|
|
2015-11-29 22:29:54 +00:00
|
|
|
// // var_dump( $a2 );
|
|
|
|
// }
|
2015-11-25 14:13:27 +00:00
|
|
|
|
2015-11-24 23:08:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-24 20:06:20 +00:00
|
|
|
|
2015-11-23 22:37:23 +00:00
|
|
|
|
2015-11-24 17:35:39 +00:00
|
|
|
// $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;
|
2015-11-23 22:37:23 +00:00
|
|
|
|
2015-11-24 17:35:39 +00:00
|
|
|
// user_switch_level_1($request, $answer);
|
2015-11-23 22:37:23 +00:00
|
|
|
|
2015-11-24 17:35:39 +00:00
|
|
|
// var_dump( $answer );
|
2015-11-23 22:37:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-21 10:41:32 +00:00
|
|
|
// $_SESSION['semestre_pair'] = !$_SESSION['semestre_pair'];
|
|
|
|
// var_dump( $_SESSION['semestre_pair'] );
|
|
|
|
|
|
|
|
// var_dump( utf8_decode( utf8_decode('Introduction aux systèmes informatiques')) );
|
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-12-30 16:02:17 +00:00
|
|
|
require_once __ROOT__.'/manager/security.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-12-30 16:02:17 +00:00
|
|
|
require_once __ROOT__.'/manager/security.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
|
|
|
?>
|