2015-10-23 11:08:33 +00:00
|
|
|
<?php define('__ROOT__', dirname(dirname(__FILE__)) );
|
2015-10-28 17:08:12 +00:00
|
|
|
require_once __ROOT__.'/manager/security.php';
|
2015-10-24 17:01:22 +00:00
|
|
|
require_once __ROOT__.'/manager/groups.php';
|
2015-10-21 20:56:56 +00:00
|
|
|
|
|
|
|
/****************************************
|
|
|
|
* *
|
|
|
|
* SECTION "GROUPES" *
|
|
|
|
* *
|
|
|
|
*****************************************
|
|
|
|
*
|
2015-10-22 11:50:56 +00:00
|
|
|
* [1] Présentation (studend + prof)
|
2015-10-21 20:56:56 +00:00
|
|
|
* [2] Tout les groupes (tous connecté)
|
|
|
|
* [3] Modifier les groupes (admin)
|
|
|
|
* [4] Répartir les élèves (admin)
|
|
|
|
*
|
|
|
|
*****************************************/
|
2015-10-23 11:08:33 +00:00
|
|
|
|
2015-10-22 11:50:56 +00:00
|
|
|
?>
|
2015-10-21 20:56:56 +00:00
|
|
|
|
2015-10-23 11:08:33 +00:00
|
|
|
|
|
|
|
|
2015-10-27 11:30:56 +00:00
|
|
|
<section name='allgroups' title='tous les groupes' class='basic'>
|
2015-10-28 17:08:12 +00:00
|
|
|
<?php if( $_SESSION['identifiant'] != null ){ // si connecté
|
2015-10-21 20:56:56 +00:00
|
|
|
|
2015-10-23 11:08:33 +00:00
|
|
|
|
|
|
|
$request = new stdClass();
|
|
|
|
$answer = new stdClass();
|
|
|
|
|
2015-10-28 17:08:12 +00:00
|
|
|
$request->level_1 = 'grouplist';
|
|
|
|
$request->semestre = '3';
|
|
|
|
$request->annee = '2015';
|
2015-10-22 21:06:25 +00:00
|
|
|
|
2015-10-23 11:08:33 +00:00
|
|
|
groups_switch_level_1($request, $answer);
|
2015-10-22 21:06:25 +00:00
|
|
|
|
2015-10-24 17:01:22 +00:00
|
|
|
if( $answer->request == 'success' ){ // si pas d'erreur
|
|
|
|
//////////////////////////////////////////////////////////////
|
2015-10-22 21:06:25 +00:00
|
|
|
|
2015-10-24 17:01:22 +00:00
|
|
|
foreach($answer->grouplist as $group){ // pour chaque groupe
|
2015-10-22 21:06:25 +00:00
|
|
|
|
2015-10-24 17:01:22 +00:00
|
|
|
if( count($group->userlist) > 0 ){ // s'il y a des utilisateurs
|
2015-10-22 21:06:25 +00:00
|
|
|
|
2015-10-24 17:01:22 +00:00
|
|
|
echo "<table class='basic'>";
|
2015-10-22 21:06:25 +00:00
|
|
|
|
2015-10-24 17:01:22 +00:00
|
|
|
echo '<thead>';
|
2015-10-23 11:08:33 +00:00
|
|
|
echo '<tr>';
|
2015-10-24 17:01:22 +00:00
|
|
|
echo '<th colspan=5>Groupe '.$group->nom.'</th>';
|
2015-10-23 11:08:33 +00:00
|
|
|
echo '</tr>';
|
2015-10-24 17:01:22 +00:00
|
|
|
echo '</thead>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo '<tbody>';
|
2015-10-25 16:55:18 +00:00
|
|
|
|
2015-10-24 17:01:22 +00:00
|
|
|
|
|
|
|
// pour chaque utilisateur
|
|
|
|
foreach($group->userlist as $user){
|
|
|
|
|
|
|
|
echo '<tr>';
|
|
|
|
|
|
|
|
foreach($user as $key=>$value)
|
|
|
|
if( $key == 'prenom' || $key == 'nom' )
|
|
|
|
echo '<td>'.$value.'</td>';
|
|
|
|
echo '</tr>';
|
|
|
|
}
|
2015-10-23 11:08:33 +00:00
|
|
|
|
2015-10-25 16:55:18 +00:00
|
|
|
echo '<tr><td colspan=5 class=more></td></tr>';
|
|
|
|
|
2015-10-24 17:01:22 +00:00
|
|
|
echo '</tbody>';
|
2015-10-23 11:08:33 +00:00
|
|
|
|
2015-10-24 17:01:22 +00:00
|
|
|
echo '</table>';
|
2015-10-23 11:08:33 +00:00
|
|
|
|
2015-10-24 17:01:22 +00:00
|
|
|
}
|
2015-10-22 21:06:25 +00:00
|
|
|
}
|
2015-10-24 17:01:22 +00:00
|
|
|
////////////////////////////////////////////////////////
|
|
|
|
}else
|
|
|
|
echo "Erreur interne...";
|
2015-10-23 11:08:33 +00:00
|
|
|
|
2015-10-22 21:06:25 +00:00
|
|
|
|
2015-10-22 11:50:56 +00:00
|
|
|
} ?>
|
|
|
|
</section>
|
2015-10-21 20:56:56 +00:00
|
|
|
|
2015-10-23 08:04:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-25 16:55:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- mon groupe -->
|
|
|
|
|
|
|
|
<?php
|
|
|
|
/******************/
|
|
|
|
/*** MON GROUPE ***/
|
|
|
|
/******************/
|
2015-10-28 17:08:12 +00:00
|
|
|
if( $_SESSION['identifiant'] != null && $_SESSION['droits'] == 'student' ){ // si l'utilisateur est connecté et que c'est un élève
|
2015-10-27 11:30:56 +00:00
|
|
|
echo "<section name='mygroup' title='Mon groupe' class='basic'>";
|
2015-10-25 16:55:18 +00:00
|
|
|
|
|
|
|
$request = new stdClass(); $answer = new stdClass();
|
|
|
|
|
|
|
|
$request->level_1 = 'get';
|
2015-10-28 17:08:12 +00:00
|
|
|
$request->etudiant = $_SESSION['identifiant'];
|
|
|
|
$request->semestre = '3';
|
|
|
|
$request->annee = '2015';
|
|
|
|
|
2015-10-25 16:55:18 +00:00
|
|
|
groups_switch_level_1($request, $answer);
|
|
|
|
|
|
|
|
if( $answer->request == 'success' ){ // si pas d'erreur
|
|
|
|
$monGroupe = $answer->groupe;
|
|
|
|
|
|
|
|
$request = new stdClass(); $answer = new stdClass();
|
|
|
|
$request->level_1 = 'userlist';
|
|
|
|
$request->groupe = $monGroupe;
|
2015-10-28 17:08:12 +00:00
|
|
|
$request->semestre = '3';
|
|
|
|
$request->annee = '2015';
|
2015-10-25 16:55:18 +00:00
|
|
|
groups_switch_level_1($request, $answer);
|
|
|
|
|
|
|
|
if( $answer->request == 'success' ){ // si on a bien récupéré les membres du groupe
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
echo "<table class='basic'>";
|
|
|
|
|
2015-10-26 00:32:18 +00:00
|
|
|
echo "<thead class='active'><tr>";
|
2015-10-25 16:55:18 +00:00
|
|
|
echo '<th colspan=5>Groupe '.$monGroupe.'</th>';
|
|
|
|
echo '</tr></thead>';
|
|
|
|
|
|
|
|
echo '<tbody>';
|
|
|
|
|
|
|
|
// pour chaque utilisateur
|
|
|
|
foreach($answer->userlist as $user){
|
|
|
|
echo '<tr>';
|
|
|
|
foreach($user as $key=>$value)
|
|
|
|
if( $key == 'prenom' || $key == 'nom' )
|
|
|
|
echo '<td>'.$value.'</td>';
|
|
|
|
echo '</tr>';
|
|
|
|
}
|
|
|
|
|
2015-10-26 00:32:18 +00:00
|
|
|
// echo '<tr><td colspan=5 class=more></td></tr>';
|
2015-10-25 16:55:18 +00:00
|
|
|
|
|
|
|
echo '</tbody>';
|
|
|
|
|
|
|
|
echo '</table>';
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
}else
|
|
|
|
echo "Erreur interne.";
|
|
|
|
}else
|
|
|
|
echo "Aucun groupe trouvé pour cet utilisateur.";
|
|
|
|
|
|
|
|
echo '</section>';
|
|
|
|
} ?>
|
|
|
|
|
|
|
|
|
2015-10-21 20:56:56 +00:00
|
|
|
|
2015-10-27 11:30:56 +00:00
|
|
|
<!-- DEPLACEMENT D'ELEVES -->
|
2015-10-21 20:56:56 +00:00
|
|
|
|
2015-10-27 11:30:56 +00:00
|
|
|
<?php
|
|
|
|
/****************************/
|
|
|
|
/*** DEPLACEMENT D'ELEVES ***/
|
|
|
|
/****************************/
|
2015-10-28 17:08:12 +00:00
|
|
|
if( $_SESSION['identifiant'] != null && $_SESSION['droits'] == 'admin' ){ // si l'utilisateur est connecté et que c'est un élève
|
2015-10-27 11:30:56 +00:00
|
|
|
echo "<section name='movestudents' title=\"Déplacements\" class='basic'>";
|
2015-10-21 20:56:56 +00:00
|
|
|
|
2015-10-27 11:30:56 +00:00
|
|
|
$request = new stdClass();
|
|
|
|
$answer = new stdClass();
|
2015-10-21 20:56:56 +00:00
|
|
|
|
2015-10-27 11:30:56 +00:00
|
|
|
$request->level_1 = 'grouplist';
|
2015-10-28 17:08:12 +00:00
|
|
|
$request->semestre = '3';
|
|
|
|
$request->annee = '2015';
|
2015-10-27 11:30:56 +00:00
|
|
|
|
|
|
|
groups_switch_level_1($request, $answer);
|
|
|
|
|
|
|
|
if( $answer->request == 'success' ){ // si pas d'erreur
|
|
|
|
//////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
foreach($answer->grouplist as $group){ // pour chaque groupe
|
|
|
|
|
|
|
|
if( count($group->userlist) > 0 ){ // s'il y a des utilisateurs
|
|
|
|
|
|
|
|
echo "<table class='basic'>";
|
|
|
|
|
|
|
|
echo '<thead>';
|
|
|
|
echo '<tr>';
|
|
|
|
echo '<th colspan=5>Groupe '.$group->nom.'</th>';
|
|
|
|
echo '</tr>';
|
|
|
|
echo '</thead>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo '<tbody>';
|
|
|
|
|
|
|
|
|
|
|
|
// pour chaque utilisateur
|
|
|
|
foreach($group->userlist as $user){
|
|
|
|
|
|
|
|
echo '<tr>';
|
|
|
|
|
|
|
|
foreach($user as $key=>$value)
|
|
|
|
if( $key == 'prenom' || $key == 'nom' )
|
|
|
|
echo '<td>'.$value.'</td>';
|
|
|
|
echo '</tr>';
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '<tr><td colspan=5 class=more></td></tr>';
|
|
|
|
|
|
|
|
echo '</tbody>';
|
|
|
|
|
|
|
|
echo '</table>';
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
////////////////////////////////////////////////////////
|
|
|
|
}else
|
|
|
|
echo "Erreur interne...";
|
|
|
|
|
|
|
|
echo '</section>';
|
|
|
|
} ?>
|