228 lines
7.0 KiB
PHP
Executable File
228 lines
7.0 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';
|
|
|
|
|
|
|
|
|
|
/*** GESTION DES PARAMETRES OPTIONNELS ***/
|
|
|
|
$postVars = array(); // on récupère les variables post
|
|
|
|
foreach($_POST as $k=>$v)
|
|
array_push($postVars, $k);
|
|
|
|
/* GESTION GROUPE OPTIONNEL */
|
|
if( isset($postVars[1]) && is_string($postVars[1]) && strlen($postVars[1]) > 1 )
|
|
$groupeOpt = $postVars[1];
|
|
else
|
|
$groupeOpt = null;
|
|
|
|
|
|
|
|
/****************************************
|
|
* *
|
|
* 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 = 'getNotesEtudiant';
|
|
$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>";
|
|
echo '<tr>';
|
|
echo "<th colspan=5 style='font-size:1.5em; text-align:center;'>".$UE['nom'].' - '.$UE['libelle'].'</th>';
|
|
echo '</tr>';
|
|
|
|
echo '</thead></table>';
|
|
foreach($UE['modules'] as $module){ // pour chaque module
|
|
echo '<table class=basic><thead>';
|
|
echo '<tr><th colspan=5>'.$module['nom'].' - '.$module['libelle'].'</th></tr></thead><tbody>';
|
|
|
|
foreach($module['controles'] as $controle){ // pour chaque contrôle
|
|
echo '<tr>';
|
|
echo '<td><span class=link>'.$controle['intitule'].'</span></td>';
|
|
|
|
if( count($controle['notes']) == 0 ) // si aucune note pour ce controle on affiche 'Pas de note'
|
|
echo '<td><span class=unstressed>Pas de note</span></td>';
|
|
else // si une note, alors on l'affiche
|
|
echo '<td>'.number_format($controle['notes'][0]['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>";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************/
|
|
/*** LES UE (version enseignant) ***/
|
|
/***********************************/
|
|
if( permission('teacher') ){ // si l'utilisateur est connecté et que c'est un élève
|
|
|
|
$request = new stdClass(); $answer = new stdClass();
|
|
debug();
|
|
|
|
$request->level_1 = 'getControlesEnseignant';
|
|
$request->enseignant = $_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='controlesenseignants' title='Contrôles' class='basic'>";
|
|
|
|
if( count($answer->UEs) > 0 ){ // si au moins un UE
|
|
|
|
foreach($answer->UEs as $UE){ // pour chaque UE
|
|
echo "<table class='basic col4'>";
|
|
echo "<thead>";
|
|
echo '<tr>';
|
|
echo "<th colspan=5 style='font-size:1.5em; text-align:center;'>".$UE['nom'].' - '.$UE['libelle'].'</th>';
|
|
echo '</tr>';
|
|
|
|
echo '</thead></table>';
|
|
if( count($UE['modules']) > 0 ){ // s'il y a au moins un module
|
|
|
|
foreach($UE['modules'] as $module){ // pour chaque module
|
|
echo "<table class='basic col4'><thead>";
|
|
echo '<tr><th colspan=4>'.$module['nom'].' - '.$module['libelle'].'</th></tr></thead><tbody>';
|
|
|
|
if( count($module['controles']) > 0 ){ // s'il y a au moins un contrôle pour ce module
|
|
|
|
foreach($module['controles'] as $controle){ // pour chaque contrôle
|
|
echo '<tr>';
|
|
echo '<td><span class=link>'.$controle['intitule'].'</span></td>';
|
|
|
|
echo "<td>".$module['nom']." - ".$module['libelle']."</td>";
|
|
|
|
if( count($controle['notes']) == 0 ) // si il y a au moins une note pour ce contrôle
|
|
echo '<td><span class=unstressed>Pas noté</span></td>';
|
|
else
|
|
echo '<td><span class=unstressed>Moyenne de</span> 10 <span class=unstressed>/</span> 20</td>';
|
|
// echo '<td>'.number_format($controle['moyenne'], 2).'</td>';
|
|
|
|
echo '<td><span class=unstressed>Coefficient</span> '.number_format($controle['coefficient'], 2).'</td>';
|
|
echo '</tr>';
|
|
|
|
echo "<tr class='noborder transparentbg'><td></td><td colspan=3><table class='basic col4'><tbody>";
|
|
|
|
foreach($controle['notes'] as $note){ // on affiche la liste des élèves avec leurs notes
|
|
echo "<tr>";
|
|
echo "<td><span class='link group' data-grp='".$note['id_groupe']."' data-ctrl='".$controle['id']."'>".$note['groupe']."</span></td>";
|
|
if( $note['nb_notes'] == 1 )
|
|
echo "<td>".$note['nb_notes']." <span class=unstressed>note</span></td>";
|
|
else
|
|
echo "<td>".$note['nb_notes']." <span class=unstressed>notes</span></td>";
|
|
|
|
echo "<td><span class=unstressed>Allant de</span> ".$note['min']." <span class=unstressed>à</span> ".$note['max']."</td>";
|
|
echo "<td><span class=unstressed>Moyenne de </span>".number_format($note['moyenne'], 2)." <span class=unstressed>/</span> ".$controle['base']."</td>";
|
|
echo "</tr>";
|
|
}
|
|
|
|
echo '</tbody></table></td></tr>';
|
|
}
|
|
|
|
}else // si aucun contrôle pour ce module
|
|
echo "<tr><td colspan=5>Aucun contrôle trouvé</td></tr>";
|
|
|
|
echo '</tbody>';
|
|
}
|
|
|
|
}
|
|
echo '</table>';
|
|
}
|
|
|
|
}
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
echo '</section>';
|
|
}else
|
|
echo "<section name='controlesenseignants' title='Contrôles' class='basic'><table class=basic><tbody><tr><td>Aucun contrôle trouvé</td></tr></tbody></table></section>";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?>
|