2015-10-29 23:01:35 +00:00
|
|
|
<?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';
|
|
|
|
|
2015-11-13 23:47:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** GESTION DES PARAMETRES OPTIONNELS ***/
|
|
|
|
|
2015-11-15 17:12:49 +00:00
|
|
|
// on initialise les paramètres optionnels
|
|
|
|
$controleOpt = null;
|
|
|
|
$groupeOpt = null;
|
|
|
|
$etudiantOpt = null;
|
|
|
|
$ueOpt = null;
|
2015-11-13 23:47:11 +00:00
|
|
|
|
2015-11-15 17:12:49 +00:00
|
|
|
// on cherche dans toutes les variables _get si on trouve des paramètres
|
|
|
|
foreach($_POST as $k=>$v){
|
2015-11-13 23:47:11 +00:00
|
|
|
|
2015-11-15 17:12:49 +00:00
|
|
|
if( preg_match('/^g:(.+)$/', $k, $m) ) // g:nomGroupe
|
|
|
|
$groupeOpt = $m[1];
|
2015-11-13 23:47:11 +00:00
|
|
|
|
2015-11-15 17:12:49 +00:00
|
|
|
if( preg_match('/^c:(.+)$/', $k, $m) ) // s:nomSemestre
|
|
|
|
$controleOpt = $m[1];
|
2015-11-13 23:47:11 +00:00
|
|
|
|
2015-11-15 17:12:49 +00:00
|
|
|
if( preg_match('/^e:(.+)$/', $k, $m) ) // s:nomSemestre
|
|
|
|
$etudiantOpt = $m[1];
|
|
|
|
|
|
|
|
if( preg_match('/^u:(.+)$/', $k, $m) ) // s:nomSemestre
|
|
|
|
$ueOpt = $m[1];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$controleOpt = ($controleOpt == null || $controleOpt == '*') ? null : $controleOpt;
|
|
|
|
$groupeOpt = ($groupeOpt == null || $groupeOpt == '*') ? null : $groupeOpt;
|
|
|
|
$etudiantOpt = ($etudiantOpt == null || $etudiantOpt == '*') ? null : $etudiantOpt;
|
|
|
|
$ueOpt = ($ueOpt == null || $ueOpt == '*') ? null : $ueOpt;
|
2015-11-13 23:47:11 +00:00
|
|
|
|
2015-10-29 23:01:35 +00:00
|
|
|
/****************************************
|
|
|
|
* *
|
|
|
|
* SECTION "PARCOURS" *
|
|
|
|
* *
|
|
|
|
*****************************************
|
|
|
|
*
|
|
|
|
* [1] Mes modules (eleves) notes
|
|
|
|
* [2] Mes ue (eleves) notes
|
|
|
|
* [3] Mes semestres (eleves) notes
|
|
|
|
* [4] Graphiques (eleves) notes
|
|
|
|
*
|
|
|
|
*****************************************/
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
2015-11-06 13:05:14 +00:00
|
|
|
|
|
|
|
|
2015-11-15 17:28:29 +00:00
|
|
|
<!-- mes contrôles -->
|
2015-10-29 23:01:35 +00:00
|
|
|
|
|
|
|
<?php
|
2015-11-15 17:28:29 +00:00
|
|
|
/****************************************/
|
|
|
|
/*** MES CONTRÔLES (version étudiant) ***/
|
|
|
|
/****************************************/
|
2015-11-06 22:00:08 +00:00
|
|
|
if( permission('student') ){ // si l'utilisateur est connecté et que c'est un élève
|
2015-10-29 23:01:35 +00:00
|
|
|
|
|
|
|
$request = new stdClass(); $answer = new stdClass();
|
|
|
|
debug();
|
|
|
|
|
2015-11-13 18:07:36 +00:00
|
|
|
$request->level_1 = 'getNotesEtudiant';
|
2015-10-29 23:01:35 +00:00
|
|
|
$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
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2015-11-15 14:42:12 +00:00
|
|
|
echo "<section name='marksbyue' data-title='Mes Notes' class='basic'>";
|
2015-10-29 23:01:35 +00:00
|
|
|
|
2015-11-15 17:28:29 +00:00
|
|
|
echo "<table class='partlist' name='UE'><tbody><tr>";
|
|
|
|
if( $ueOpt == null ) echo "<td data-value='*' class='active'>Tous</td>";
|
|
|
|
else echo "<td data-value='*'>Tous</td>";
|
|
|
|
|
|
|
|
foreach($answer->UEs as $UE)
|
|
|
|
if( $UE['nom'] == $ueOpt ) // si c'est le semestre séléctionné
|
|
|
|
echo "<td data-value='".$UE['nom']."' class='active'>".$UE['nom'].'</td>';
|
|
|
|
else // sinon on affiche normalement
|
|
|
|
echo "<td data-value='".$UE['nom']."'>".$UE['nom'].'</td>';
|
|
|
|
echo "</tr></tbody></table>";
|
|
|
|
|
2015-11-12 10:19:58 +00:00
|
|
|
foreach($answer->UEs as $UE){ // pour chaque UE
|
|
|
|
|
2015-11-15 17:28:29 +00:00
|
|
|
if( $ueOpt == null || $UE['nom'] == $ueOpt ){ // on affiche l'UE en fonction du paramètre passé par l'URL
|
|
|
|
|
|
|
|
echo '</thead></table>';
|
|
|
|
foreach($UE['modules'] as $module){ // pour chaque module
|
|
|
|
echo '<table class=basic><thead class=normal>';
|
|
|
|
echo '<tr><th colspan=5><strong>'.$UE['nom'].'</strong> - '.$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>';
|
2015-11-13 16:24:58 +00:00
|
|
|
}
|
2015-11-15 17:28:29 +00:00
|
|
|
echo '</table>';
|
|
|
|
|
2015-11-13 16:24:58 +00:00
|
|
|
}
|
2015-11-12 10:19:58 +00:00
|
|
|
|
2015-10-29 23:01:35 +00:00
|
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
echo '</section>';
|
|
|
|
}else
|
2015-11-15 14:42:12 +00:00
|
|
|
echo "<section name='marksbyue' data-title='Mes Notes' class='basic'><table class=basic><tbody><tr><td>Aucune note trouvée</td></tr></tbody></table></section>";
|
2015-10-29 23:01:35 +00:00
|
|
|
|
2015-11-13 18:07:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-14 17:33:06 +00:00
|
|
|
/******************************************/
|
|
|
|
/*** LES CONTRÔLES (version enseignant) ***/
|
|
|
|
/******************************************/
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
* [1] Tous les contrôles
|
|
|
|
* [2] Un contrôle particulier( avec ou sans groupe particulier )
|
|
|
|
*
|
|
|
|
*/
|
2015-11-13 18:07:36 +00:00
|
|
|
|
2015-11-14 17:33:06 +00:00
|
|
|
|
|
|
|
/* [1] Tous les contrôles
|
|
|
|
==================================================================*/
|
|
|
|
if( permission('teacher') && $controleOpt == null ){ // si c'est un enseignant et qu'aucun contrôle n'est spécifié
|
|
|
|
|
|
|
|
|
2015-11-13 18:07:36 +00:00
|
|
|
$request = new stdClass(); $answer = new stdClass();
|
|
|
|
|
|
|
|
$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
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2015-11-15 14:42:12 +00:00
|
|
|
echo "<section name='controlesenseignants' data-title='Contrôles' class='basic'>";
|
2015-11-13 18:07:36 +00:00
|
|
|
|
2015-11-15 17:12:49 +00:00
|
|
|
|
|
|
|
echo "<table class='partlist' name='UE'><tbody><tr>";
|
2015-11-15 17:28:29 +00:00
|
|
|
if( $ueOpt == null ) echo "<td data-value='*' class='active'>Tous</td>";
|
|
|
|
else echo "<td data-value='*'>Tous</td>";
|
|
|
|
|
|
|
|
foreach($answer->UEs as $UE)
|
|
|
|
if( $UE['nom'] == $ueOpt ) // si c'est le semestre séléctionné
|
|
|
|
echo "<td data-value='".$UE['nom']."' class='active'>".$UE['nom'].'</td>';
|
|
|
|
else // sinon on affiche normalement
|
|
|
|
echo "<td data-value='".$UE['nom']."'>".$UE['nom'].'</td>';
|
2015-11-15 17:12:49 +00:00
|
|
|
echo "</tr></tbody></table>";
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-13 18:07:36 +00:00
|
|
|
if( count($answer->UEs) > 0 ){ // si au moins un UE
|
|
|
|
|
|
|
|
foreach($answer->UEs as $UE){ // pour chaque UE
|
2015-11-15 17:12:49 +00:00
|
|
|
|
2015-11-15 17:28:29 +00:00
|
|
|
if( $ueOpt == null || $UE['nom'] == $ueOpt ){ // on affiche l'UE en fonction du paramètre passé par l'URL
|
2015-11-15 17:12:49 +00:00
|
|
|
|
|
|
|
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 class=normal>";
|
|
|
|
echo '<tr><th colspan=4><strong>'.$UE['nom'].'</strong> - '.$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 ctrl' data-ctrl='".$controle['id']."'>".$controle['intitule']."</span></td>";
|
2015-11-13 23:47:11 +00:00
|
|
|
|
2015-11-15 17:12:49 +00:00
|
|
|
echo "<td>".$module['nom']." - ".$module['libelle']."</td>";
|
2015-11-13 23:47:11 +00:00
|
|
|
|
2015-11-15 17:12:49 +00:00
|
|
|
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>';
|
2015-11-13 23:47:11 +00:00
|
|
|
else
|
2015-11-15 17:12:49 +00:00
|
|
|
echo '<td><span class=unstressed>Moyenne de</span> '.number_format($controle['moyenne'], 2).' <span class=unstressed>/</span> '.$controle['base'].'</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 grp ctrl' data-grp='".$note['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>';
|
2015-11-13 23:47:11 +00:00
|
|
|
}
|
|
|
|
|
2015-11-15 17:12:49 +00:00
|
|
|
}else // si aucun contrôle pour ce module
|
|
|
|
echo "<tr><td colspan=5>Aucun contrôle trouvé</td></tr>";
|
2015-11-13 18:07:36 +00:00
|
|
|
|
2015-11-15 17:12:49 +00:00
|
|
|
echo '</tbody>';
|
|
|
|
}
|
2015-11-13 18:07:36 +00:00
|
|
|
|
|
|
|
}
|
2015-11-15 17:12:49 +00:00
|
|
|
echo '</table>';
|
2015-11-13 18:07:36 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
echo '</section>';
|
|
|
|
}else
|
2015-11-15 14:42:12 +00:00
|
|
|
echo "<section name='controlesenseignants' data-title='Contrôles' class='basic'><table class=basic><tbody><tr><td>Aucun contrôle trouvé</td></tr></tbody></table></section>";
|
2015-11-13 18:07:36 +00:00
|
|
|
|
2015-11-14 17:33:06 +00:00
|
|
|
|
|
|
|
|
2015-11-13 18:07:36 +00:00
|
|
|
}
|
|
|
|
|
2015-11-14 17:33:06 +00:00
|
|
|
/* [2] Un contrôle particulier( avec ou sans groupe particulier )
|
|
|
|
==================================================================*/
|
|
|
|
elseif( permission('teacher') ){ // si enseignant et qu'un contrôle est spécifié
|
|
|
|
|
|
|
|
|
|
|
|
$request = new stdClass(); $answer = new stdClass();
|
|
|
|
|
|
|
|
$request->level_1 = 'getNotesEnseignant';
|
|
|
|
$request->enseignant = $_SESSION['identifiant'];
|
|
|
|
$request->controle = $controleOpt;
|
|
|
|
if( $groupeOpt != null ) $request->groupe = $groupeOpt; // on définit le groupe s'il est spécifié
|
|
|
|
|
|
|
|
|
|
|
|
career_switch_level_1($request, $answer);
|
|
|
|
|
|
|
|
if( $answer->request == 'success' ){
|
2015-11-15 14:42:12 +00:00
|
|
|
echo "<section name='controlesenseignants' data-title='Contrôles' class='basic'>";
|
2015-11-14 17:33:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
// bouton retour
|
|
|
|
// echo "<table class='basic'><thead><tr><th><span class='link'>Retour</span></th></tr></thead></table>";
|
|
|
|
// echo "<table class='basic'><thead><tr><th></th></tr></thead></table>";
|
|
|
|
|
|
|
|
|
|
|
|
echo "<table class='basic col4'><thead>";
|
2015-11-15 11:15:30 +00:00
|
|
|
echo "<th colspan=5 style='font-size:1.5em; text-align:center;'>".$answer->controle['module'].' - '.$answer->controle['intitule'].'</th>';
|
2015-11-14 17:33:06 +00:00
|
|
|
|
|
|
|
echo '<tr>';
|
|
|
|
echo "<th><span class='link ctrl' data-ctrl='".$answer->controle['id']."'>".$answer->controle['intitule']."</span></th>";
|
|
|
|
|
|
|
|
echo "<th>".$answer->controle['module']." - ".$answer->controle['modulelib']."</th>";
|
|
|
|
|
2015-11-15 11:15:30 +00:00
|
|
|
|
|
|
|
/* [1] Affichage par groupes
|
|
|
|
====================================================================================*/
|
|
|
|
if( $groupeOpt == null ){
|
|
|
|
|
|
|
|
if( count($answer->controle['grouplist']) == 0 ) // si il y a au moins une note pour ce contrôle
|
|
|
|
echo '<th><span class=unstressed>Pas noté</span></th>';
|
|
|
|
else
|
|
|
|
echo '<th><span class=unstressed>Moyenne de</span> '.number_format($answer->controle['moyenne'], 2).' <span class=unstressed>/</span> '.$answer->controle['base'].'</th>';
|
|
|
|
|
|
|
|
/* [2] Affichage par élèves
|
|
|
|
====================================================================================*/
|
|
|
|
}else{
|
|
|
|
|
|
|
|
if( count($answer->controle['userlist']) == 0 ) // si il y a au moins une note pour ce contrôle
|
|
|
|
echo '<th><span class=unstressed>Pas noté</span></th>';
|
|
|
|
else
|
|
|
|
echo '<th><span class=unstressed>Moyenne de</span> '.number_format($answer->controle['moyenne'], 2).' <span class=unstressed>/</span> '.$answer->controle['base'].'</th>';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-11-14 17:33:06 +00:00
|
|
|
echo '<th><span class=unstressed>Coefficient</span> '.number_format($answer->controle['coefficient'], 2).'</th>';
|
|
|
|
|
|
|
|
echo '</tr></thead>';
|
|
|
|
|
|
|
|
echo "<tbody>";
|
|
|
|
|
2015-11-15 11:15:30 +00:00
|
|
|
|
|
|
|
/* [1] Affichage par groupes
|
|
|
|
====================================================================================*/
|
|
|
|
if( $groupeOpt == null ){
|
|
|
|
|
|
|
|
foreach($answer->controle['grouplist'] as $note){ // on affiche la liste des groupes avec leurs stats
|
|
|
|
echo "<tr>";
|
2015-11-14 17:33:06 +00:00
|
|
|
|
2015-11-15 11:15:30 +00:00
|
|
|
echo "<td><span class='link grp ctrl' data-grp='".$note['groupe']."' data-ctrl='".$answer->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> ".$answer->controle['base']."</td>";
|
2015-11-14 17:33:06 +00:00
|
|
|
|
|
|
|
|
2015-11-15 11:15:30 +00:00
|
|
|
echo "</tr>";
|
|
|
|
}
|
|
|
|
|
|
|
|
/* [2] Affichage par élèves
|
|
|
|
====================================================================================*/
|
|
|
|
}else{
|
|
|
|
|
|
|
|
foreach($answer->controle['userlist'] as $user){ // on affiche la liste des élèves avec leurs notes
|
|
|
|
echo "<tr>";
|
|
|
|
|
2015-11-15 14:42:12 +00:00
|
|
|
echo "<td><span class='link etu' data-etu='".$user['identifiant']."' data-ctrl='".$answer->controle['id']."' data-info='".$user['prenom'].' '.$user['nom']."'>".$user['identifiant']."</span></td>";
|
2015-11-15 11:15:30 +00:00
|
|
|
echo "<td><span class='link grp' data-grp='".$user['groupe']."'>".$user['groupe']."</span></td>";
|
|
|
|
|
2015-11-15 12:02:34 +00:00
|
|
|
if( $user['note'] != null ) // si on a une note
|
2015-11-15 11:15:30 +00:00
|
|
|
echo "<td>".number_format($user['note'], 2)." <span class=unstressed>/</span> ".$answer->controle['base']."</td>";
|
|
|
|
else // si noté
|
|
|
|
echo "<td><span class=unstressed>Pas noté</span></td>";
|
2015-11-14 17:33:06 +00:00
|
|
|
|
2015-11-15 12:02:34 +00:00
|
|
|
echo "<td>";
|
2015-11-15 14:12:26 +00:00
|
|
|
if( $user['note'] != null ) // s'il a déjà une note, on la met par défaut
|
|
|
|
echo "<input class='saisie_note' data-ctrl='".$answer->controle['id']."' type='number' step='.25' min='0' max='".$answer->controle['base']."' placeholder='Note' value='".$user['note']."'>";
|
|
|
|
else // sinon on laisse le champ vide
|
|
|
|
echo "<input class='saisie_note' data-ctrl='".$answer->controle['id']."' type='number' step='.25' min='0' max='".$answer->controle['base']."' placeholder='Note'>";
|
|
|
|
|
2015-11-15 14:42:12 +00:00
|
|
|
echo "<div class='valider_action' data-info='confirmer'></div>";
|
2015-11-15 12:02:34 +00:00
|
|
|
echo "</td>";
|
2015-11-14 17:33:06 +00:00
|
|
|
|
2015-11-15 11:15:30 +00:00
|
|
|
echo "</tr>";
|
|
|
|
}
|
2015-11-14 17:33:06 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '</tbody></table>';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2015-11-13 18:07:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-15 17:12:49 +00:00
|
|
|
/***************************************************/
|
|
|
|
/*** LES DOSSIERS ETUDIANTS (version enseignant) ***/
|
|
|
|
/***************************************************/
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
* [1] Toutes les notes d'un enseignant
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
if( permission('teacher') && $etudiantOpt != null ){
|
|
|
|
|
|
|
|
$request = new stdClass(); $answer = new stdClass();
|
|
|
|
|
|
|
|
$request->level_1 = 'getNotesEtudiant';
|
|
|
|
$request->etudiant = $etudiantOpt;
|
|
|
|
$request->semestre = $_SESSION['semestre'];
|
|
|
|
$request->annee = $_SESSION['annee'];
|
|
|
|
|
|
|
|
career_switch_level_1($request, $answer);
|
|
|
|
|
|
|
|
var_dump( $answer );
|
|
|
|
|
|
|
|
if( $answer->request == 'success' ){ // si on a bien récupéré les UE/notes
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
echo "<section name='studentcase' data-title='Dossier étudiant' class='basic'>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach($answer->UEs as $UE){ // pour chaque UE
|
|
|
|
echo "<table class='basic col4'>";
|
|
|
|
|
|
|
|
echo "<thead><tr><th colspan=5 style='font-size:1.5em; text-align:center;'>".$UE['nom'].' - '.$UE['libelle'].'</th></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='studentcase' data-title='Dossier étudiant' class='basic'><table class=basic><tbody><tr><td>Aucune note trouvée</td></tr></tbody></table></section>";
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-13 18:07:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?>
|