[x] Afficher les mentions jury dans le dossier étudiant

This commit is contained in:
xdrm-brackets 2016-01-03 12:12:50 +01:00
parent c087f7cadf
commit c2ef609182
3 changed files with 19 additions and 7 deletions

View File

@ -258,7 +258,7 @@ class semestreRepo{
*
*/
public static function getParcours($etudiant){
$getSemestreListe = DataBase::getPDO()->prepare("SELECT DISTINCT s.id_semestre as id, f.id_formation, f.code, f.nom as formation, f.nb_semestres, s.nom as semestre, s.rang, s.annee
$getSemestreListe = DataBase::getPDO()->prepare("SELECT DISTINCT s.id_semestre as id, f.id_formation, f.code, f.nom as formation, f.nb_semestres, s.nom as semestre, s.rang, s.annee, app.mention
FROM formation as f, semestre as s, appartenance as app
WHERE s.id_formation = f.id_formation
AND app.id_semestre = s.id_semestre

View File

@ -1075,7 +1075,7 @@ if( (permission('master') || permission('admin')) && $etudiantOpt != null ){
echo "<section name='studentcase' data-title='Dossier étudiant' class='basic'>";
$parcoursChart = array();
foreach($answer->parcours as $semestre) array_push($parcoursChart, array('id'=>$semestre['id'], 'nom' => $semestre['formation'].' '.$semestre['semestre']) );
foreach($answer->parcours as $semestre) array_push($parcoursChart, array('id'=>$semestre['id'], 'nom' => $semestre['formation'].' '.$semestre['semestre'], 'mention' => $semestre['mention']) );
displayParcours( $parcoursChart );

View File

@ -26,7 +26,7 @@ function displayParcours($parcours){
/* paramètres graphiques */
$line = array( 'x' => $M, 'y' => '57', 'width' => $W-2*$M, 'height' => 6 );
$dot = array( 'y' => 60, 'r' => ($M <= 20 ) ? $M/3 : 10 );
$text = array( 'y' => 30 );
$text = array( 'y' => 30, 'yMention' => 100 );
$themes = array( // couleur des thèmes
'pamplemousse' => '#f34e4e',
@ -35,12 +35,14 @@ function displayParcours($parcours){
'tomato' => '#d50000',
'twitter' => '#30b6ea',
'facebook' => '#3372c5',
'blou' => '#3c73e6'
'blou' => '#3c73e6',
'default' => '#28b965'
);
/* CHOIX DU THEME */
$themeColor = $themes['twitter'];
$textColor = $themes['facebook'];
$themeColor = $themes['default'];
$textColor = $themes['default'];
$currentColor = $themes['pamplemousse']; // couleur du semestre courant
@ -59,8 +61,18 @@ function displayParcours($parcours){
// [3] points d'ancrages
for($i = 0 ; $i < $n ; $i++){
$ti = $lettrePixel * strlen( $parcours[$i]['nom'] ); // longueur du texte actuel
// (1) nom du semestre
echo "<text x='".($M+2*$M*$i - $ti/2)."' y='".$text['y']."' fill='".$textColor."' style='font-family:Ubuntu;font-size:16px;'>".$parcours[$i]['nom']."</text>";
echo "<circle class='semestre_circle' data-stre='".$parcours[$i]['id']."' cx='".($M+2*$M*$i)."' cy='".$dot['y']."' r='".$dot['r']."' stroke='".$themeColor."' stroke-width='".(.8*$dot['r'])."' fill='#ecf0f1'/>";
// (2) cercle
if( $i == $n-1 ) // si dernier semestre, on met en valeur
echo "<circle style='cursor:pointer;' class='semestre_circle' data-stre='".$parcours[$i]['id']."' cx='".($M+2*$M*$i)."' cy='".$dot['y']."' r='".$dot['r']."' stroke='".$currentColor."' stroke-width='".(.8*$dot['r'])."' fill='#ecf0f1'/>";
else // sinon on affiche normalement
echo "<circle style='cursor:pointer;' class='semestre_circle' data-stre='".$parcours[$i]['id']."' cx='".($M+2*$M*$i)."' cy='".$dot['y']."' r='".$dot['r']."' stroke='".$themeColor."' stroke-width='".(.8*$dot['r'])."' fill='#ecf0f1'/>";
// (3) mention obtenue
echo "<text x='".($M+2*$M*$i - 5*$lettrePixel/2)."' y='".$text['yMention']."' fill='".$textColor."' style='font-family:Ubuntu;font-size:16px;'>".$parcours[$i]['mention']."</text>";
}
echo "</svg>";