58 lines
1.8 KiB
PHP
Executable File
58 lines
1.8 KiB
PHP
Executable File
<?php define('__ROOT__', dirname(dirname(__FILE__)) );
|
|
require_once __ROOT__.'/manager/security.php';
|
|
require_once __ROOT__.'/manager/groups.php';
|
|
require_once __ROOT__.'/manager/modules.php';
|
|
|
|
/****************************************
|
|
* *
|
|
* SECTION "MODULES" *
|
|
* *
|
|
*****************************************
|
|
*
|
|
* [1] MES MODULES (studend + prof)
|
|
* [2] MES MODULES (prof)
|
|
*
|
|
*****************************************/
|
|
?>
|
|
|
|
|
|
<!-- mes modules -->
|
|
|
|
<?php
|
|
/**************************************/
|
|
/*** MES MODULES (version étudiant) ***/
|
|
/**************************************/
|
|
if( $_SESSION['identifiant'] != null && $_SESSION['droits'] == 'student' ){ // si l'utilisateur est connecté et que c'est un élève
|
|
|
|
$request = new stdClass(); $answer = new stdClass();
|
|
|
|
$request->level_1 = 'getByEtudiant';
|
|
$request->etudiant = $_SESSION['identifiant'];
|
|
$request->semestre = $_SESSION['semestre'];
|
|
$request->annee = $_SESSION['annee'];
|
|
|
|
modules_switch_level_1($request, $answer);
|
|
|
|
if( $answer->request == 'success' ){ // si on a bien récupéré les membres du groupe
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
echo "<section name='mymodules' title='Mes modules' class='basic'>";
|
|
|
|
foreach($answer->modules as $module){
|
|
echo "<table class='basic'>";
|
|
echo "<thead class='active'>";
|
|
echo '<tr>';
|
|
echo '<th colspan=5>'.$module['nom'].'</th>';
|
|
echo '</tr>';
|
|
echo '</thead>';
|
|
echo '<tbody>';
|
|
echo '<tr><td>'.$module['libelle'].'</td></tr>';
|
|
echo '</tbody>';
|
|
echo '</table>';
|
|
}
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
echo '</section>';
|
|
}else
|
|
echo "Erreur interne.";
|
|
|
|
} ?>
|