sid/page/groups.php

95 lines
1.8 KiB
PHP
Raw Normal View History

2015-10-23 11:08:33 +00:00
<?php define('__ROOT__', dirname(dirname(__FILE__)) );
require_once __ROOT__.'/manager/security.php'; session_init();
// debug();
/****************************************
* *
* SECTION "GROUPES" *
* *
*****************************************
*
2015-10-22 11:50:56 +00:00
* [1] Présentation (studend + prof)
* [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-23 11:08:33 +00:00
<section name='allgroup' title='tous les groupes'>
<?php if( $_SESSION['username'] != null ){ // si connecté
2015-10-22 21:06:25 +00:00
2015-10-23 11:08:33 +00:00
include __ROOT__.'/manager/groups.php';
$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-23 11:08:33 +00:00
foreach($answer->grouplist as $group){ // pour chaque groupe
2015-10-22 21:06:25 +00:00
2015-10-23 11:08:33 +00:00
if( count($group->userlist) > 0 ){ // s'il y a des utilisateurs
2015-10-22 21:06:25 +00:00
2015-10-23 11:08:33 +00:00
echo "<table class='basic'>";
2015-10-22 21:06:25 +00:00
2015-10-23 11:08:33 +00:00
echo '<thead>';
echo '<tr>';
echo '<th colspan=5>Groupe '.$group->nom.'</th>';
echo '</tr>';
echo '</thead>';
2015-10-22 21:06:25 +00:00
2015-10-23 11:08:33 +00:00
echo '<tbody>';
// pour chaque utilisateur
foreach($group->userlist as $user){
echo '<tr>';
foreach($user as $key=>$value)
if( $key == 'prenom' || $key == 'nom' )
2015-10-23 11:08:33 +00:00
echo '<td>'.$value.'</td>';
echo '</tr>';
}
echo '</tbody>';
echo '</table>';
2015-10-22 21:06:25 +00:00
}
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-22 11:50:56 +00:00
<section name='groups' title='Groupes'>
Groupes
</section>
2015-10-22 11:50:56 +00:00
<section name='case' title='Suivi'>
Suivi
</section>
2015-10-22 11:50:56 +00:00
<section name='modules' title='Modules'>
Modules
</section>
2015-10-22 11:50:56 +00:00
<section name='marks' title='Notes'>
Notes
</section>
2015-10-22 11:50:56 +00:00
<section name='settings' title='Paramètres'>
Paramètres
</section>