From 87def5505a48a736ad5dfb8a0ca5a38300f50a0f Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sun, 29 Nov 2015 23:29:54 +0100 Subject: [PATCH] =?UTF-8?q?Premi=C3=A8re=20mise=20en=20beaut=C3=A9=20+=20?= =?UTF-8?q?=C3=A9v=C3=A8nement=20sur=20=20pour=20le=20dossier=20?= =?UTF-8?q?=C3=A9tudiant=20+=20d=C3=A9ploiement=20et=20impl=C3=A9mentation?= =?UTF-8?q?=20compl=C3=A8te=20de=20toutes=20les=20informations=20qui=20d?= =?UTF-8?q?=C3=A9coulent=20du=20parcours=20semestres>ues>modules>controles?= =?UTF-8?q?(+note)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/career.php | 17 +++++--- manager/database.php | 30 +++++++++++++++ manager/repo/semestre.php | 23 +++++++++++ page/_JS/career.js | 35 +++++++++++++++++ page/career.php | 64 ++++++++++++++++--------------- src/files/admin2_import_mcc.xlsx | Bin 0 -> 9131 bytes svg.php | 22 +++++++++-- test.php | 38 +++++++++--------- 8 files changed, 170 insertions(+), 59 deletions(-) create mode 100755 src/files/admin2_import_mcc.xlsx diff --git a/manager/career.php b/manager/career.php index 3d642d1..d212eb1 100755 --- a/manager/career.php +++ b/manager/career.php @@ -189,15 +189,20 @@ require_once __ROOT__.'/manager/database.php'; /**********************************************/ /* informations relatives au dossier étudiant */ /**********************************************/ - case 'studentcase': if( permission('teacher') || permission('master') || permission('admin') ){ + case 'studentcase': if( permission('master') || permission('admin') ){ - $areSetParam = isset($request->etudiant) && isset($request->controle) && isset($request->note); // les arguments existent - $typeOkParam = $areSetParam && is_string($request->etudiant); // si c'est des strings - $nEmptyParam = $typeOkParam && strlen($request->etudiant) > 0 && is_numeric($request->controle) && is_numeric($request->note); // des bon types - $etudiantCheck = $nEmptyParam && preg_match('/^[\w -]{3,50}$/i', $request->etudiant); // nom bon format + $areSetParam = isset($request->etudiant) ; // les arguments existent + $typeOkParam = $areSetParam && is_string($request->etudiant); // si c'est des strings + $etudiantCheck = $typeOkParam && preg_match('/^[\w -]{3,50}$/i', $request->etudiant); // nom bon format if( $etudiantCheck ){ // si tout les paramètres sont bons - $answer->request = DataBase::getInstance()->saisieNote($request->etudiant, $request->controle, $request->note); + $parcours = DataBase::getInstance()->getParcoursEtudiant($request->etudiant); + + if( is_array($parcours) ){ + $answer->parcours = $parcours; + $answer->request = 'success'; + }else + $answer->request = $parcours; }else $answer->request = 'param_error'; diff --git a/manager/database.php b/manager/database.php index 631b903..b0b12e4 100755 --- a/manager/database.php +++ b/manager/database.php @@ -740,6 +740,36 @@ class DataBase{ } + + /*************************************************/ + /* retourne les informations du dossier étudiant */ + /*************************************************/ + public function getParcoursEtudiant($etudiant){ + // on vérifie l'existence de l'étudiant + if( !($etudiantUID=userRepo::UID($etudiant)) ) return 'unknown_user'; + + + $parcours = semestreRepo::getParcours($etudiantUID); + foreach($parcours as $iter_s=>$semestre){ + $parcours[$iter_s]['UEs'] = ueRepo::forStudent($etudiantUID, $semestre['id']); + + foreach($parcours[$iter_s]['UEs'] as $iter_ue=>$UE){ + $parcours[$iter_s]['UEs'][$iter_ue]['modules'] = moduleRepo::forStudent($UE['id'], $semestre['id']); + + foreach($parcours[$iter_s]['UEs'][$iter_ue]['modules'] as $iter_mod=>$MOD){ + $parcours[$iter_s]['UEs'][$iter_ue]['modules'][$iter_mod]['controles'] = controleRepo::forStudent($MOD['id'], $semestre['id']); + + foreach($parcours[$iter_s]['UEs'][$iter_ue]['modules'][$iter_mod]['controles'] as $iter_ct=>$CONTROLE) + $parcours[$iter_s]['UEs'][$iter_ue]['modules'][$iter_mod]['controles'][$iter_ct]['notes'] = noteRepo::forStudent($etudiantUID, $CONTROLE['id']); + + } + } + } + + return $parcours; + } + + /*******************************************/ /*** retourne les notes d'un enseignant ***/ /*******************************************/ diff --git a/manager/repo/semestre.php b/manager/repo/semestre.php index 6fad16c..2f7f9d5 100755 --- a/manager/repo/semestre.php +++ b/manager/repo/semestre.php @@ -231,6 +231,29 @@ class semestreRepo extends DBAccess{ } + /* retourne le parcours d'un étudiant sous forme d'un tableau de semestres + * + * @etudiant l'UID de l'étudiant en question + * + * + * @return semestres retourne la liste des semestres du parcours de l'étudiant (ordre chronologique) + * + */ + 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 + FROM formation as f, semestre as s, appartenance as app + WHERE s.id_formation = f.id_formation + AND app.id_semestre = s.id_semestre + AND app.id_etudiant = :etudiant + ORDER BY s.annee, s.rang"); + $getSemestreListe->execute(array( ':etudiant' => $etudiant )); + + + return DataBase::delNumeric( $getSemestreListe->fetchAll() ); + } + + + /* retourne la liste des semestres qu'à un enseignant * diff --git a/page/_JS/career.js b/page/_JS/career.js index 881d88f..e208ce1 100755 --- a/page/_JS/career.js +++ b/page/_JS/career.js @@ -394,5 +394,40 @@ if( document.querySelector('#CONTAINER section[name=allcontroles]') != null ){ / +/*******************************/ +/* GESTION DU DOSSIER ETUDIANT */ +/*******************************/ +var studentCase = document.querySelector('#CONTAINER > section[name=studentcase]'); +if( studentCase != null ){ + + var semestreLinks = document.querySelectorAll('#CONTAINER > section[name=studentcase] .semestre_circle'); + + // pour chaque semestre, on créé l'évènement + for( var i = 0 ; i < semestreLinks.length ; i++ ){ + + semestreLinks[i].addEventListener('click', function(e){ + if( e.target.getAttribute('class') == 'semestre_circle' && e.target.getAttribute('data-stre') != null ){ + console.log(e.target); + pageM.vars[2] = 's:'+e.target.getAttribute('data-stre'); + reload(); + } + + }, false); + + } + + +} + + + + + + + + + + + --> \ No newline at end of file diff --git a/page/career.php b/page/career.php index 6b94880..cc4af6e 100755 --- a/page/career.php +++ b/page/career.php @@ -849,11 +849,8 @@ if( (permission('master') || permission('admin')) && $etudiantOpt != null ){ $request = new stdClass(); $answer = new stdClass(); - $request->level_1 = 'getNotesEtudiant'; + $request->level_1 = 'studentcase'; $request->etudiant = $etudiantOpt; - $request->formation = '1'; // ITINN1 2015 - $request->semestre = '1'; // S1 ITINN1 2015 - $request->annee = $_SESSION['annee']; career_switch_level_1($request, $answer); @@ -861,38 +858,45 @@ if( (permission('master') || permission('admin')) && $etudiantOpt != null ){ //////////////////////////////////////////////////////////////////////////////// echo "
"; - $parcours = array('ITINN1 S1', 'ITINN1 S2', 'ITINN2 S3', 'ITINN2 S4'); - displayParcours( $parcours ); + $parcoursChart = array(); + foreach($answer->parcours as $semestre) array_push($parcoursChart, array('id'=>$semestre['id'], 'nom' => $semestre['formation'].' '.$semestre['semestre']) ); + + displayParcours( $parcoursChart ); - foreach($answer->UEs as $UE){ // pour chaque UE - echo "
"; - - echo "'; - - echo '
".$UE['nom'].' - '.$UE['libelle'].'
'; - foreach($UE['modules'] as $module){ // pour chaque module - echo ''; - echo ''; + // pour chaque semestres (tous si aucun semestreOpt, sinon uniquement le selectionné) + foreach($answer->parcours as $semestre){ if( $semestreOpt == null || $semestreOpt == $semestre['id'] ){ - foreach($module['controles'] as $controle){ // pour chaque contrôle - echo ''; - echo ''; + foreach($semestre['UEs'] as $UE){ // pour chaque UE + echo "
'.$module['nom'].' - '.$module['libelle'].'
'.$controle['libelle'].'
"; + + echo "'; + + echo '
".$UE['nom'].' - '.$UE['libelle'].'
'; + foreach($UE['modules'] as $module){ // pour chaque module + echo ''; + echo ''; - if( count($controle['notes']) == 0 ) // si aucune note pour ce controle on affiche 'Pas de note' - echo ''; - else // si une note, alors on l'affiche - echo ''; - - echo ""; - echo ''; - echo ''; + foreach($module['controles'] as $controle){ // pour chaque contrôle + echo ''; + echo ''; + + if( count($controle['notes']) == 0 ) // si aucune note pour ce controle on affiche 'Pas de note' + echo ''; + else // si une note, alors on l'affiche + echo ''; + + echo ""; + echo ''; + echo ''; + } + echo ''; } - echo ''; - } - echo '
'.$module['nom'].' - '.$module['libelle'].'
Pas de note'.number_format($controle['notes'][0]['valeur'], 2).' / '.$controle['base'].'".$module['nom']." - ".$module['libelle']."Coefficient '.number_format($controle['coefficient'], 2).'
'.$controle['libelle'].'Pas de note'.number_format($controle['notes'][0]['valeur'], 2).' / '.$controle['base'].'".$module['nom']." - ".$module['libelle']."Coefficient '.number_format($controle['coefficient'], 2).'
'; + echo ''; - } + } + + }} //////////////////////////////////////////////////////////////////////////////// echo ''; }else diff --git a/src/files/admin2_import_mcc.xlsx b/src/files/admin2_import_mcc.xlsx new file mode 100755 index 0000000000000000000000000000000000000000..7c391af2a18ded33e187b3b4e85dba37f93af75c GIT binary patch literal 9131 zcmaKS1z1$w+BOIbGe`_WcO#NRgLK2tAxJkOozjSOcQ*neh@^ysbfYwgBi$_^UEkn) z&UyXc|NG7}bFIDibv@78>waRbeXV<`DWag_BLRUxq}5VCIix@2A>!WH#nR4|gZ;k! zkT?QE;RJ^r_(jJ1c+?X}Thz9Ok7mjH1*8w(n(}8rN!f`EFZ#prPg{>NYVr84Ir zRwt3!a*?u*WqK^pvDd^tg?ZR#J7lf4I$!9%YQyMp%m>RRyX}5aCpsY4kU_s0sCPay zda`U%O#Ug%V$Q-R*xt|><<4UBG`#e5-g^EjMmy{*IIXI5M>fo3)#!n&;MlUxn|QV} zCRq;d7F^X4Y0ankq$#6p!N7iCUYKrJUtFpj`MFec22S|wL|I0C8gocHqxtfcklPia*lM}nA zykKci*D{X=)krFC;aj6OxN%3isc4ns6uCOx`b`mL4pYRPd3qk4 zJJh*4ho(n+hK70W&`3Z_^LCNM z)Q2TKd7V-^SUohbT9}gF=UL>R86EhjlJFt+i!aXD5KFj1X{7LX@X~&A}&0u`NM!5Vx;zEP1|MOwfqjceQ^~O@VAY+#IA5v zHTkSe-Fh#B;qsx(3H`W8IyJAjT=`kyk^(=Q^-zZ=c9Bx&cTBbq z_IS})`hi7^PS|VRGKCCv6_dOUkFSb&7nv|es!Uwthh=mK+SV9WkU**(_E>C00wvtvSmqs=eYaS(^YA*Ge~{UvilJ&F0+nu$gQ8(7G?G5yyw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R^ zmCK}JM#REzF2`U$a7@B-=#SLn4ifZ?TRv)&L#0;?A4lo3qdi%xb8glU6}4+)FAhgl z2|B@6yogjcvin?)PIa1c=F@Rt$Z9Dy`Jslj44@y*y-;9YbXtJ64Bf5yhK5Q(CT(NS zH*zd99q4@2UxjhkwY2k{spY85acnGsJ|E5Oq?*$(Im_LiRg?k?wAqw5TC=NI1+&WH zpY@Q?%0KmMSliZ^HleE->&0o9a@6XMZP$Cu118+KnAJLp=)}`;AybKsKr9iyeSJ_) zqbrkJPdSr=r$47t6D415_eu`Ddqs1$l24f*sd=t8Op^tf# zI`f7DkB7=#F!7UgYv!TIu0bf+;g>L{3Xh%6;Wd`&;-%t(P^wyV=7VXm7OTjE;g_8Y zsjiWgqmZh8-P{eC%tjD`U;ZoYg@*{NzLcYbo27%Bv6h#UrK{oZ zt?=Xy#V#m*@4*!dtYZA_F*WVpOR(^EyH{#@%ZCDc$b3}o)q!7WRz48^?dQ1K(dUD+ z`LuW&(O-u3$n-mgY;R>Ab2)t{+nKKO)D>NAFcZzv8nQ1?-$s}gqbTzQ)=LaHI^w9EWz-7o9i9WHlJsXB07kamILiI5Eja8L~e z>=j5gkA5j%822P`g{#$xW8pUJC>)N>PT6hkE&brCt8J6!r{1r@CW==Y1BV6ae!sa! zGyE=c9)#0%5EZ4Si2MK_>F;wDe;zEjKUeYp${(jJ{%QCp<9>hc;BO&8yy~B)5dLZX zCoz1_%Kt5bh|Ktp^}jj#f13Zvp5C*^f6FL>Z27;rmZ<*M5>!(}1KcZt5I-?Qq_k=7pZ*6Mf+VQ` literal 0 HcmV?d00001 diff --git a/svg.php b/svg.php index fdfa572..e69d143 100644 --- a/svg.php +++ b/svg.php @@ -6,7 +6,7 @@ function displayParcours($parcours){ /* paramètres de texte */ $lettrePixel = 10; // taille d'une lettre pour centrer le texte $maxLettres = 0; - foreach($parcours as $p) if( strlen($p) > $maxLettres ) $maxLettres = strlen($p); // on récupère le libellé le plus long + foreach($parcours as $p) if( strlen($p['nom']) > $maxLettres ) $maxLettres = strlen($p['nom']); // on récupère le libellé le plus long /* calcul du positionnement */ @@ -57,9 +57,9 @@ function displayParcours($parcours){ // [3] points d'ancrages for($i = 0 ; $i < $n ; $i++){ - $ti = $lettrePixel * strlen( $parcours[$i] ); // longueur du texte actuel - echo "".$parcours[$i].""; - echo ""; + $ti = $lettrePixel * strlen( $parcours[$i]['nom'] ); // longueur du texte actuel + echo "".$parcours[$i]['nom'].""; + echo ""; } echo ""; @@ -67,4 +67,18 @@ function displayParcours($parcours){ /* FIN DU SVG */ /**************/ } + + + + + +// exemple +// displayParcours(array( +// array('id'=>1, 'nom'=>'S1'), +// array('id'=>2, 'nom'=>'S2'), +// array('id'=>3, 'nom'=>'S3'), +// array('id'=>4, 'nom'=>'S4') +// )); + + ?> \ No newline at end of file diff --git a/test.php b/test.php index 846ecbf..5622478 100755 --- a/test.php +++ b/test.php @@ -48,35 +48,35 @@ debug(); // $_SESSION['annee'] = 2015; -require_once __ROOT__.'/manager/phpExcel.php'; -require_once __ROOT__.'/manager/groups.php'; +// require_once __ROOT__.'/manager/phpExcel.php'; +// require_once __ROOT__.'/manager/groups.php'; -$_SESSION['identifiant'] = 'modele'; // afin de lire le fichier +// $_SESSION['identifiant'] = 'modele'; // afin de lire le fichier -$r1 = new stdClass(); $a1 = new stdClass(); -$r1->level_1 = 'import_mcc'; +// $r1 = new stdClass(); $a1 = new stdClass(); +// $r1->level_1 = 'import_mcc'; -xlsx_switch_lvl1($r1, $a1); +// xlsx_switch_lvl1($r1, $a1); -if( $a1->request == 'success' ){ +// if( $a1->request == 'success' ){ - $mcc = $a1->mcc; - $ue11 = $mcc[0]; $ue11mods = $ue11['modules']; - $ue12 = $mcc[1]; $ue12mods = $ue12['modules']; +// $mcc = $a1->mcc; +// $ue11 = $mcc[0]; $ue11mods = $ue11['modules']; +// $ue12 = $mcc[1]; $ue12mods = $ue12['modules']; - var_dump( $ue11mods[0]['controles'] ); +// var_dump( $ue11mods[0]['controles'] ); - // $r2 = new stdClass(); $a2 = new stdClass(); - // $r2->level_1 = 'addUserlist'; - // $r2->rang = 1; - // $r2->annee = 2018; - // $r2->formationList = $a1->formationList; +// // $r2 = new stdClass(); $a2 = new stdClass(); +// // $r2->level_1 = 'addUserlist'; +// // $r2->rang = 1; +// // $r2->annee = 2018; +// // $r2->formationList = $a1->formationList; - // groups_switch_level_1($r2, $a2); +// // groups_switch_level_1($r2, $a2); - // var_dump( $a2 ); -} +// // var_dump( $a2 ); +// }