2015-10-23 11:08:33 +00:00
|
|
|
<?php define('__ROOT__', dirname(dirname(__FILE__)) );
|
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-24 17:01:22 +00:00
|
|
|
<section name='allgroups' title='tous les groupes'>
|
2015-10-23 08:04:26 +00:00
|
|
|
<?php if( $_SESSION['username'] != 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();
|
|
|
|
|
|
|
|
$request->level_1 = 'grouplist';
|
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 ***/
|
|
|
|
/******************/
|
|
|
|
if( $_SESSION['username'] != null && $_SESSION['permissions'] == 'student' ){ // si l'utilisateur est connecté et que c'est un élève
|
|
|
|
echo "<section name='mygroup' title='Mon groupe'>";
|
|
|
|
|
|
|
|
$request = new stdClass(); $answer = new stdClass();
|
|
|
|
|
|
|
|
$request->level_1 = 'get';
|
|
|
|
$request->etudiant = $_SESSION['username'];
|
|
|
|
|
|
|
|
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;
|
|
|
|
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'>";
|
|
|
|
|
|
|
|
echo '<thead><tr>';
|
|
|
|
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>';
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '<tr><td colspan=5 class=more></td></tr>';
|
|
|
|
|
|
|
|
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-22 11:50:56 +00:00
|
|
|
<section name='case' title='Suivi'>
|
|
|
|
Suivi
|
|
|
|
</section>
|
2015-10-21 20:56:56 +00:00
|
|
|
|
2015-10-22 11:50:56 +00:00
|
|
|
<section name='modules' title='Modules'>
|
|
|
|
Modules
|
|
|
|
</section>
|
2015-10-21 20:56:56 +00:00
|
|
|
|
2015-10-22 11:50:56 +00:00
|
|
|
<section name='marks' title='Notes'>
|
|
|
|
Notes
|
|
|
|
</section>
|
2015-10-21 20:56:56 +00:00
|
|
|
|
2015-10-22 11:50:56 +00:00
|
|
|
<section name='settings' title='Paramètres'>
|
|
|
|
Paramètres
|
|
|
|
</section>
|