diff --git a/manager/repo/semestre.php b/manager/repo/semestre.php index 4dda3a0..3e19042 100755 --- a/manager/repo/semestre.php +++ b/manager/repo/semestre.php @@ -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 diff --git a/page/career.php b/page/career.php index d329fb6..73a4a04 100755 --- a/page/career.php +++ b/page/career.php @@ -1075,7 +1075,7 @@ if( (permission('master') || permission('admin')) && $etudiantOpt != null ){ echo "
"; $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 ); diff --git a/src/svg.php b/src/svg.php index ddd9975..9d9944a 100755 --- a/src/svg.php +++ b/src/svg.php @@ -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 "".$parcours[$i]['nom'].""; - echo ""; + + // (2) cercle + if( $i == $n-1 ) // si dernier semestre, on met en valeur + echo ""; + else // sinon on affiche normalement + echo ""; + + // (3) mention obtenue + echo "".$parcours[$i]['mention'].""; } echo "";