From ae2450c9e37298a0783bb3ddfe11f676826a8a9c Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 9 Jan 2016 18:10:28 +0100 Subject: [PATCH] =?UTF-8?q?[x]=20Gestion=20capitalisaton=20automatique=20l?= =?UTF-8?q?ors=20premi=C3=A8re=20vue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- manager/conf_hostinger.json | 6 +++++ manager/database.php | 41 +++++++++++++----------------- src/files/admin2_export_jury.xlsx | Bin 6394 -> 6490 bytes src/files/admin2_import_jury.xlsx | Bin 4708 -> 4878 bytes 5 files changed, 24 insertions(+), 25 deletions(-) create mode 100755 manager/conf_hostinger.json mode change 100755 => 100644 src/files/admin2_export_jury.xlsx diff --git a/.gitignore b/.gitignore index 1f1ae9b..3297d50 100755 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/manager/conf*.json \ No newline at end of file +/manager/conf.json \ No newline at end of file diff --git a/manager/conf_hostinger.json b/manager/conf_hostinger.json new file mode 100755 index 0000000..3472bbb --- /dev/null +++ b/manager/conf_hostinger.json @@ -0,0 +1,6 @@ +{ + "host" : "mysql.hostinger.fr", + "dbname" : "u712664263_sid", + "user" : "u712664263_php", + "password" : "Qt358nUdyeTxLDM8" +} \ No newline at end of file diff --git a/manager/database.php b/manager/database.php index 5838e49..494665c 100755 --- a/manager/database.php +++ b/manager/database.php @@ -1,15 +1,5 @@ 0 ) - if( !in_array( array($semestre['id_formation'], $semestre['rang']), $listeSemestresCapitalisables) ) - array_push($listeSemestresCapitalisables, array($semestre['id_formation'], $semestre['rang'])); + // si pas déjà ajouté, on ajoute le rang+formation à la liste + if( !in_array( array($semestre['id_formation'], $semestre['rang']), $listeSemestresFR) ) + array_push($listeSemestresFR, array($semestre['id_formation'], $semestre['rang'])); $parcours[$iter_s]['UEs'] = ueRepo::forStudent($etudiantUID, $semestre['id']); @@ -1141,12 +1130,12 @@ class DataBase{ $totalSemestre += $tmpUE['coefficient']; // le semestre est non compensable si la moyenne d'au moins un UE < 8 - if( 20*$tmpUE['moyenne']['moyenne']/$tmpUE['moyenne']['base'] < 8 ) - $semestreCompensable = false; + // if( 20*$tmpUE['moyenne']['moyenne']/$tmpUE['moyenne']['base'] < 8 ) + // $semestreCompensable = false; - // semestreCompensé est VRAI si au moins un semestre est entre 8 et 10 - if( 20*$tmpUE['moyenne']['moyenne']/$tmpUE['moyenne']['base'] >= 8 && 20*$tmpUE['moyenne']['moyenne']/$tmpUE['moyenne']['base'] < 10 ) - $semestreCompensation = true; + // // semestreCompensé est VRAI si au moins un semestre est entre 8 et 10 + // if( 20*$tmpUE['moyenne']['moyenne']/$tmpUE['moyenne']['base'] >= 8 && 20*$tmpUE['moyenne']['moyenne']/$tmpUE['moyenne']['base'] < 10 ) + // $semestreCompensation = true; } } @@ -1182,17 +1171,19 @@ class DataBase{ /* LISTE DES UES CAPITALISÉES PAR SEMESTRES REGROUPÉS (FORMATION+RANG) */ // On ajoute toutes les UE capitalisées - foreach($listeSemestresCapitalisables as $i=>$formationRang){ + foreach($listeSemestresFR as $i=>$formationRang){ // pour cette formation+rang, on récupère toutes les UEs $listeUEs = array(); $UEUIDS = array(); $listeSemestresIndexes = array(); - foreach($parcours as $iter_s=>$semestre){ + //var_dump('f:'.$formationRang[0].'/'.$formationRang[1]); + foreach(array_reverse($parcours) as $iter_s=>$semestre){ // si fait partie de la formation+rang courante if( $formationRang == array( $semestre['id_formation'], $semestre['rang'] ) ){ + //var_dump(' s:'.$semestre['id']); // on ajoute l'index du semestre à la liste array_push($listeSemestresIndexes, $iter_s); @@ -1202,11 +1193,13 @@ class DataBase{ if( !in_array($UE['id'], $semestre['inactive']) ){ if( array_search($UE['id'], $UEUIDS) === false ){ // pour le premier UE (capitalisé) on s'assure de lui attribuer la capitalisation + //var_dump(' u:'.$UE['id']); DataBase::getInstance()->capitaliserUE($UE['id'], $semestre['id'], $etudiantUID); array_push( $listeUEs, $UE ); array_push( $UEUIDS, $UE['id'] ); - }//else // si UE existe déjà pour formation+rang, on créé la capitalisation du semestre (on le désactive) - } + } + }//else + //var_dump(' x:'.$UE['id']); } } diff --git a/src/files/admin2_export_jury.xlsx b/src/files/admin2_export_jury.xlsx old mode 100755 new mode 100644 index bbfe941ebed7d163982553ad0c5fb7889add9aac..843c207878ae346f185542b61e077a50b0d9c23c GIT binary patch delta 1949 zcmZWq2{ap67fu8z6;(?Fi6x4lwQntDYOkHzI<}(iL{UqBp+!TrAp{}Ra*R$bttAtU zl&UR7$JU^R+FDV@Qn3$FbjpOD(>Xo=JLjG6o_Ftk@0|O+``taw2`z||Er?qb000~V z;E2jp2o4D1AnhUW#5bdYOZuD91EK=49GA5^l1PpN0s#A50KiF3;?=M~r^vAITk3&f zk=N8>LPN@3-Z;!^2sN*Hn75V?R{S4~p#r(dAGw5uX+KkZnahp z!vSx`k}0gn=$A_*@%N$wLZpqG7j_6)Tt$CRG`zd_&t>17t}<)XuMg9spJ8PYry`Me zhgDpAts3ygKbeCnyDin+R8Dt;0xD4UEFjsAMh-7%{yb>I(4e4+tc#R{ehI@8sM8I6 z_BQTXKD?*XrMgFp9HZ{1hjb}2!a8&=HBeN_%)kxD&#$8 zL|X7qBa^4mqaH6hs>&ncv9A0n6?Ijv+<0UD%HJb43-6-X8@gK4QG$ES1mmUGi@S3{ z_VkgZKAS-GPsmJ{^rWx?dh!B2Pu!d#VWJ|TK3=0>LKz!K9XJ82fh|ojwZ~sh^w}Q# z(iA1JZJ7i~Q6&kbzVPr4mfzGD%Ul|R$PwadhKa5^z|9qW;)JT^)uNFD=?l}=4zkHx z+&)XC4go14$$K=$aZ22>B}-(&@bZS>4}{W`!P7j#hqTppZcVOo=<4TCCki0Z#i7`! ztO17(4T0n}Ba0kE+r~DXCpx4Z8Xn}GATlFV$Anf!*eoL(HqIG!`4R*KtwYc5eF-_Z zI!B zlVL&iWVNH}EfJG7^xuKwVJ&8>)ojO`txweTlrd+v7AGSHpY7tB?&RO0zii%5P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