sid/page/career.php

76 lines
2.6 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';
require_once __ROOT__.'/manager/career.php';
/****************************************
* *
* SECTION "PARCOURS" *
* *
*****************************************
*
* [1] Mes modules (eleves) notes
* [2] Mes ue (eleves) notes
* [3] Mes semestres (eleves) notes
* [4] Graphiques (eleves) notes
*
*****************************************/
?>
<!-- mes UEs -->
<?php
/**********************************/
/*** MES UEs (version étudiant) ***/
/**********************************/
if( permission('student') ){ // si l'utilisateur est connecté et que c'est un élève
$request = new stdClass(); $answer = new stdClass();
debug();
$request->level_1 = 'getNotesByUEs';
$request->etudiant = $_SESSION['identifiant'];
$request->semestre = $_SESSION['semestre'];
$request->annee = $_SESSION['annee'];
career_switch_level_1($request, $answer);
if( $answer->request == 'success' ){ // si on a bien récupéré les UE/notes
////////////////////////////////////////////////////////////////////////////////
echo "<section name='marksbyue' title='Mes Notes' class='basic'>";
foreach($answer->UEs as $UE){ // pour chaque UE
echo "<table class='basic col4'>";
echo "<thead class='active'>";
echo '<tr>';
echo '<th colspan=5>'.$UE['nom'].' - '.$UE['libelle'].'</th>';
echo '</tr>';
echo '</thead>';
echo '<tbody>';
foreach($UE['modules'] as $module) // pour chaque module
foreach($module['controles'] as $controle) // pour chaque contrôle
foreach($controle['notes'] as $note){ // pour chaque note
echo '<tr>';
echo '<td><span class=link>'.$controle['intitule'].'</span></td>';
echo '<td>'.number_format($note['valeur'], 2).' <span class=unstressed>/</span> '.$controle['base'].'</td>';
echo "<td>".$module['nom']." - ".$module['libelle']."</td>";
echo '<td>Coefficient '.number_format($controle['coefficient'], 2).'</td>';
echo '</tr>';
}
echo '</tbody>';
echo '</table>';
}
////////////////////////////////////////////////////////////////////////////////
echo '</section>';
}else
echo "<section name='marksbyue' title='Mes Notes' class='basic'><table class=basic><tbody><tr><td>Aucune note trouvée</td></tr></tbody></table></section>";
} ?>