Commit 697a793e authored by Laurent Lécluse's avatar Laurent Lécluse
Browse files

Ajout de plain de tables dont les MAJ et la création de données seront automatisées

parent 3829072b
<?php
$bdd = new \BddAdmin\Bdd(Config::get()['bdds']['dev-local']);
//$bdd->debug = true;
$bdd = new \BddAdmin\Bdd(Config::get('bdds', 'deploy-local'));
$oa->setBdd($bdd);
/* Insertion des données */
$dataGen = new DataGen($oa);
$u = $bdd->select("SELECT id FROM UTILISATEUR WHERE USERNAME='oseappli'");
if (isset($u[0]['ID'])){
$u = (int)$u[0]['ID'];
}
var_dump($u);
$table = 'SCENARIO';
$bdd->getTable($table)->delete();
/*
$bddp = new \BddAdmin\Bdd(Config::get()['bdds']['dev-local']);
$dataGen->update($table);
$i = $bddp->select('SELECT * FROM tbl order by ordre');
$indicateurs = [];
foreach( $i as $indic ){
$indicateurs[] = $indic;
}
var_dump($indicateurs);
file_put_contents($oa->getOseDir().'/data/tbl.php', var_export($indicateurs,true));
*/
\ No newline at end of file
$r = $oa->getBdd()->getTable($table)->select();
var_dump(count($r));
\ No newline at end of file
This diff is collapsed.
<?php
return [
"enseignement" => [
"LIBELLE" => "Enseignement",
"FI" => true,
"FA" => true,
"FC" => true,
"FC_MAJOREES" => true,
"REFERENTIEL" => false,
],
"pilotage" => [
"LIBELLE" => "Pilotage",
"FI" => false,
"FA" => false,
"FC" => false,
"FC_MAJOREES" => false,
"REFERENTIEL" => true,
],
"accueil" => [
"LIBELLE" => "Accueil",
"FI" => true,
"FA" => true,
"FC" => true,
"FC_MAJOREES" => true,
"REFERENTIEL" => false,
],
];
\ No newline at end of file
This diff is collapsed.
<?php
return [
"001" => [
"LIBELLE_LONG" => "AIN",
"LIBELLE_COURT" => "AIN"
],
"002" => [
"LIBELLE_LONG" => "AISNE",
"LIBELLE_COURT" => "AISNE"
],
"003" => [
"LIBELLE_LONG" => "ALLIER",
"LIBELLE_COURT" => "ALLIER"
],
"004" => [
"LIBELLE_LONG" => "ALPES-DE-HTE-PROVENCE",
"LIBELLE_COURT" => "AL.HTE.PR."
],
"006" => [
"LIBELLE_LONG" => "ALPES-MARITIMES",
"LIBELLE_COURT" => "ALPES-MAR."
],
"007" => [
"LIBELLE_LONG" => "ARDECHE",
"LIBELLE_COURT" => "ARDECHE"
],
"008" => [
"LIBELLE_LONG" => "ARDENNES",
"LIBELLE_COURT" => "ARDENNES"
],
"009" => [
"LIBELLE_LONG" => "ARIEGE",
"LIBELLE_COURT" => "ARIEGE"
],
"010" => [
"LIBELLE_LONG" => "AUBE",
"LIBELLE_COURT" => "AUBE"
],
"011" => [
"LIBELLE_LONG" => "AUDE",
"LIBELLE_COURT" => "AUDE"
],
"012" => [
"LIBELLE_LONG" => "AVEYRON",
"LIBELLE_COURT" => "AVEYRON"
],
"067" => [
"LIBELLE_LONG" => "BAS-RHIN",
"LIBELLE_COURT" => "BAS-RHIN"
],
"013" => [
"LIBELLE_LONG" => "BOUCHES-DU-RHONE",
"LIBELLE_COURT" => "BCHES-RHO."
],
"014" => [
"LIBELLE_LONG" => "CALVADOS",
"LIBELLE_COURT" => "CALVADOS"
],
"015" => [
"LIBELLE_LONG" => "CANTAL",
"LIBELLE_COURT" => "CANTAL"
],
"016" => [
"LIBELLE_LONG" => "CHARENTE",
"LIBELLE_COURT" => "CHARENTE"
],
"017" => [
"LIBELLE_LONG" => "CHARENTE-MARITIME",
"LIBELLE_COURT" => "CHAR.-MAR."
],
"018" => [
"LIBELLE_LONG" => "CHER",
"LIBELLE_COURT" => "CHER"
],
"019" => [
"LIBELLE_LONG" => "CORREZE",
"LIBELLE_COURT" => "CORREZE"
],
"02A" => [
"LIBELLE_LONG" => "CORSE-DU-SUD",
"LIBELLE_COURT" => "CORSE-SUD"
],
"021" => [
"LIBELLE_LONG" => "COTE D'OR",
"LIBELLE_COURT" => "COTE D'OR"
],
"022" => [
"LIBELLE_LONG" => "COTES D'ARMOR",
"LIBELLE_COURT" => "COTES ARM."
],
"023" => [
"LIBELLE_LONG" => "CREUSE",
"LIBELLE_COURT" => "CREUSE"
],
"079" => [
"LIBELLE_LONG" => "DEUX-SEVRES",
"LIBELLE_COURT" => "DEUX-SEV."
],
"024" => [
"LIBELLE_LONG" => "DORDOGNE",
"LIBELLE_COURT" => "DORDOGNE"
],
"025" => [
"LIBELLE_LONG" => "DOUBS",
"LIBELLE_COURT" => "DOUBS"
],
"026" => [
"LIBELLE_LONG" => "DROME",
"LIBELLE_COURT" => "DROME"
],
"091" => [
"LIBELLE_LONG" => "ESSONNE",
"LIBELLE_COURT" => "ESSONNE"
],
"027" => [
"LIBELLE_LONG" => "EURE",
"LIBELLE_COURT" => "EURE"
],
"028" => [
"LIBELLE_LONG" => "EURE-ET-LOIR",
"LIBELLE_COURT" => "EURE-LOIR"
],
"029" => [
"LIBELLE_LONG" => "FINISTERE",
"LIBELLE_COURT" => "FINISTERE"
],
"030" => [
"LIBELLE_LONG" => "GARD",
"LIBELLE_COURT" => "GARD"
],
"032" => [
"LIBELLE_LONG" => "GERS",
"LIBELLE_COURT" => "GERS"
],
"033" => [
"LIBELLE_LONG" => "GIRONDE",
"LIBELLE_COURT" => "GIRONDE"
],
971 => [
"LIBELLE_LONG" => "GUADELOUPE",
"LIBELLE_COURT" => "GUADELOUPE"
],
973 => [
"LIBELLE_LONG" => "GUYANE",
"LIBELLE_COURT" => "GUYANE"
],
"068" => [
"LIBELLE_LONG" => "HAUT-RHIN",
"LIBELLE_COURT" => "HAUT-RHIN"
],
"02B" => [
"LIBELLE_LONG" => "HAUTE CORSE",
"LIBELLE_COURT" => "HAUTE CORSE"
],
"074" => [
"LIBELLE_LONG" => "HAUTE SAVOIE",
"LIBELLE_COURT" => "HTE SAVOIE"
],
"031" => [
"LIBELLE_LONG" => "HAUTE-GARONNE",
"LIBELLE_COURT" => "HTE-GARON."
],
"043" => [
"LIBELLE_LONG" => "HAUTE-LOIRE",
"LIBELLE_COURT" => "HTE-LOIRE"
],
"052" => [
"LIBELLE_LONG" => "HAUTE-MARNE",
"LIBELLE_COURT" => "HTE-MARNE"
],
"070" => [
"LIBELLE_LONG" => "HAUTE-SAONE",
"LIBELLE_COURT" => "HTE-SAONE"
],
"087" => [
"LIBELLE_LONG" => "HAUTE-VIENNE",
"LIBELLE_COURT" => "HTE-VIENNE"
],
"005" => [
"LIBELLE_LONG" => "HAUTES-ALPES",
"LIBELLE_COURT" => "HTES-ALPES"
],
"065" => [
"LIBELLE_LONG" => "HAUTES-PYRENEES",
"LIBELLE_COURT" => "HTES-PYR."
],
"092" => [
"LIBELLE_LONG" => "HAUTS-DE-SEINE",
"LIBELLE_COURT" => "HTS-SEINE"
],
"034" => [
"LIBELLE_LONG" => "HERAULT",
"LIBELLE_COURT" => "HERAULT"
],
"035" => [
"LIBELLE_LONG" => "ILLE-ET-VILAINE",
"LIBELLE_COURT" => "ILLE-VIL."
],
"036" => [
"LIBELLE_LONG" => "INDRE",
"LIBELLE_COURT" => "INDRE"
],
"037" => [
"LIBELLE_LONG" => "INDRE-ET-LOIRE",
"LIBELLE_COURT" => "INDRE-LOI."
],
"038" => [
"LIBELLE_LONG" => "ISERE",
"LIBELLE_COURT" => "ISERE"
],
"039" => [
"LIBELLE_LONG" => "JURA",
"LIBELLE_COURT" => "JURA"
],
974 => [
"LIBELLE_LONG" => "LA REUNION",
"LIBELLE_COURT" => "LA REUNION"
],
"040" => [
"LIBELLE_LONG" => "LANDES",
"LIBELLE_COURT" => "LANDES"
],
"041" => [
"LIBELLE_LONG" => "LOIR-ET-CHER",
"LIBELLE_COURT" => "LOIR-CHER"
],
"042" => [
"LIBELLE_LONG" => "LOIRE",
"LIBELLE_COURT" => "LOIRE"
],
"044" => [
"LIBELLE_LONG" => "LOIRE-ATLANTIQUE",
"LIBELLE_COURT" => "LOIRE-ATL."
],
"045" => [
"LIBELLE_LONG" => "LOIRET",
"LIBELLE_COURT" => "LOIRET"
],
"046" => [
"LIBELLE_LONG" => "LOT",
"LIBELLE_COURT" => "LOT"
],
"047" => [
"LIBELLE_LONG" => "LOT-ET-GARONNE",
"LIBELLE_COURT" => "LOT-ET-GA."
],
"048" => [
"LIBELLE_LONG" => "LOZERE",
"LIBELLE_COURT" => "LOZERE"
],
"049" => [
"LIBELLE_LONG" => "MAINE-ET-LOIRE",
"LIBELLE_COURT" => "MAINE-LOI."
],
"050" => [
"LIBELLE_LONG" => "MANCHE",
"LIBELLE_COURT" => "MANCHE"
],
"051" => [
"LIBELLE_LONG" => "MARNE",
"LIBELLE_COURT" => "MARNE"
],
972 => [
"LIBELLE_LONG" => "MARTINIQUE",
"LIBELLE_COURT" => "MARTINIQUE"
],
"053" => [
"LIBELLE_LONG" => "MAYENNE",
"LIBELLE_COURT" => "MAYENNE"
],
985 => [
"LIBELLE_LONG" => "MAYOTTE",
"LIBELLE_COURT" => "MAYOTTE"
],
"054" => [
"LIBELLE_LONG" => "MEURTHE-ET-MOSELLE",
"LIBELLE_COURT" => "MEUR.MOSE."
],
"055" => [
"LIBELLE_LONG" => "MEUSE",
"LIBELLE_COURT" => "MEUSE"
],
"056" => [
"LIBELLE_LONG" => "MORBIHAN",
"LIBELLE_COURT" => "MORBIHAN"
],
"057" => [
"LIBELLE_LONG" => "MOSELLE",
"LIBELLE_COURT" => "MOSELLE"
],
"058" => [
"LIBELLE_LONG" => "NIEVRE",
"LIBELLE_COURT" => "NIEVRE"
],
"059" => [
"LIBELLE_LONG" => "NORD",
"LIBELLE_COURT" => "NORD"
],
988 => [
"LIBELLE_LONG" => "NOUVELLE CALEDONIE",
"LIBELLE_COURT" => "NVLLE CALEDONIE"
],
"060" => [
"LIBELLE_LONG" => "OISE",
"LIBELLE_COURT" => "OISE"
],
"061" => [
"LIBELLE_LONG" => "ORNE",
"LIBELLE_COURT" => "ORNE"
],
"075" => [
"LIBELLE_LONG" => "PARIS",
"LIBELLE_COURT" => "PARIS"
],
"062" => [
"LIBELLE_LONG" => "PAS-DE-CALAIS",
"LIBELLE_COURT" => "PAS-CALAIS"
],
987 => [
"LIBELLE_LONG" => "POLYNESIE FRANCAISE",
"LIBELLE_COURT" => "POLYN. FRANCAISE"
],
"063" => [
"LIBELLE_LONG" => "PUY-DE-DOME",
"LIBELLE_COURT" => "PUY-DOME"
],
"064" => [
"LIBELLE_LONG" => "PYRENEES-ATLANTIQUES",
"LIBELLE_COURT" => "PY._ATL."
],
"066" => [
"LIBELLE_LONG" => "PYRENEES-ORIENTALES",
"LIBELLE_COURT" => "PYR.ORIEN."
],
"069" => [
"LIBELLE_LONG" => "RHONE",
"LIBELLE_COURT" => "RHONE"
],
"071" => [
"LIBELLE_LONG" => "SAONE-ET-LOIRE",
"LIBELLE_COURT" => "SAONE-LRE."
],
"072" => [
"LIBELLE_LONG" => "SARTHE",
"LIBELLE_COURT" => "SARTHE"
],
"073" => [
"LIBELLE_LONG" => "SAVOIE",
"LIBELLE_COURT" => "SAVOIE"
],
"076" => [
"LIBELLE_LONG" => "SEINE MARITIME",
"LIBELLE_COURT" => "SEINE MAR."
],
"077" => [
"LIBELLE_LONG" => "SEINE-ET-MARNE",
"LIBELLE_COURT" => "SEINE-MAR."
],
"093" => [
"LIBELLE_LONG" => "SEINE-SAINT-DENIS",
"LIBELLE_COURT" => "SNE-ST-DE."
],
"080" => [
"LIBELLE_LONG" => "SOMME",
"LIBELLE_COURT" => "SOMME"
],
975 => [
"LIBELLE_LONG" => "ST PIERRE ET MIQUELON",
"LIBELLE_COURT" => "ST PIERRE ET MIQU."
],
"081" => [
"LIBELLE_LONG" => "TARN",
"LIBELLE_COURT" => "TARN"
],
"082" => [
"LIBELLE_LONG" => "TARN-ET-GARONNE",
"LIBELLE_COURT" => "TARN-GARO."
],
"090" => [
"LIBELLE_LONG" => "TERRITOIRE DE BELFORT",
"LIBELLE_COURT" => "TERR. BEL."
],
"095" => [
"LIBELLE_LONG" => "VAL-D'OISE",
"LIBELLE_COURT" => "VAL-D'OISE"
],
"094" => [
"LIBELLE_LONG" => "VAL-DE-MARNE",
"LIBELLE_COURT" => "VAL-MARNE"
],
"083" => [
"LIBELLE_LONG" => "VAR",
"LIBELLE_COURT" => "VAR"
],
"084" => [
"LIBELLE_LONG" => "VAUCLUSE",
"LIBELLE_COURT" => "VAUCLUSE"
],
"085" => [
"LIBELLE_LONG" => "VENDEE",
"LIBELLE_COURT" => "VENDEE"
],
"086" => [
"LIBELLE_LONG" => "VIENNE",
"LIBELLE_COURT" => "VIENNE"
],
"088" => [
"LIBELLE_LONG" => "VOSGES",
"LIBELLE_COURT" => "VOSGES"
],
986 => [
"LIBELLE_LONG" => "WALLIS ET FUTUNA",
"LIBELLE_COURT" => "WALLIS ET FUTUNA"
],
"089" => [
"LIBELLE_LONG" => "YONNE",
"LIBELLE_COURT" => "YONNE"
],
"078" => [
"LIBELLE_LONG" => "YVELINES",
"LIBELLE_COURT" => "YVELINES"
]
];
\ No newline at end of file
<?php
return [
20 => [
"LIBELLE_COURT" => "Anth Ethno",
"LIBELLE_LONG" => "Anthropologie, ethnologie, préhistoire",
"CODES_CORRESP_1" => "20",
"CODES_CORRESP_2" => "20"
],
18 => [
"LIBELLE_COURT" => "Arts",
"LIBELLE_LONG" => "Arts : plastiques, spectacle, musique, esthétique, sciences et histoire de l'art",
"CODES_CORRESP_1" => "18",
"CODES_CORRESP_2" => "18",
"CODES_CORRESP_4" => "1700,1800,6680"
],
34 => [
"LIBELLE_COURT" => "Astro",
"LIBELLE_LONG" => "Astronomie, astrophysique",
"CODES_CORRESP_1" => "34",
"CODES_CORRESP_2" => "34"
],
99 => [
"LIBELLE_COURT" => "Autre disc",
"LIBELLE_LONG" => "Autre discipline",
"CODES_CORRESP_1" => "7600,7700,99",
"CODES_CORRESP_2" => "7500,7600,7700"
],
6465 => [
"LIBELLE_COURT" => "Biochimie",
"LIBELLE_LONG" => "Biochimie (Regroupement CNU 64 65)",
"CODES_CORRESP_1" => "6465,64,65",
"CODES_CORRESP_2" => "64,65",
"CODES_CORRESP_4" => "1615,7100,7200"
],
6668 => [
"LIBELLE_COURT" => "Biologie",
"LIBELLE_LONG" => "Biologie (Regroupement CNU 66 67 68)",
"CODES_CORRESP_1" => "6668,66,67,68",
"CODES_CORRESP_2" => "66,67,68"
],
3133 => [
"LIBELLE_COURT" => "Chimie",
"LIBELLE_LONG" => "Chimie (Regroupement CNU 31 32 33)",
"CODES_CORRESP_1" => "3133,31,32,33",
"CODES_CORRESP_2" => "31,32,33"
],
"COM" => [
"LIBELLE_COURT" => "Communication",
"LIBELLE_LONG" => "Communication",
"CODES_CORRESP_1" => "COM"
],
73 => [
"LIBELLE_COURT" => "Lang régio",
"LIBELLE_LONG" => "Cultures et langues régionales",
"CODES_CORRESP_1" => "73",
"CODES_CORRESP_2" => "73"
],
"DID" => [
"LIBELLE_COURT" => "Didactique",
"LIBELLE_LONG" => "Didactique",
"CODES_CORRESP_1" => "DID"
],
"01" => [
"LIBELLE_COURT" => "Drt Privé",
"LIBELLE_LONG" => "Droit privé et sciences criminelles",
"CODES_CORRESP_1" => "01",
"CODES_CORRESP_2" => "01"
],
"02" => [
"LIBELLE_COURT" => "Drt Public",
"LIBELLE_LONG" => "Droit public",
"CODES_CORRESP_1" => "02",
"CODES_CORRESP_2" => "02"
],
6163 => [
"LIBELLE_COURT" => "EEA",
"LIBELLE_LONG" => "EEA (Regroupement CNU 61 62 63)",
"CODES_CORRESP_1" => "6163,61,62,63",
"CODES_CORRESP_2" => "61,62,63",
"CODES_CORRESP_4" => "5100,5101,5200"
],
"EI" => [
"LIBELLE_COURT" => "Encadrement indiv",
"LIBELLE_LONG" => "Encadrement individuel de stage, de projet ou de mémoire",
"CODES_CORRESP_1" => "EI"
],
"PRO" => [
"LIBELLE_COURT" => "Professionnels",
"LIBELLE_LONG" => "Enseignement obligatoirement dispensé par des professionnels",
"CODES_CORRESP_1" => "PRO"
],
72 => [
"LIBELLE_COURT" => "Epistémo",
"LIBELLE_LONG" => "Epistémologie, histoire des sciences et des techniques",
"CODES_CORRESP_1" => "72",
"CODES_CORRESP_2" => "72"
],
"NUM" => [
"LIBELLE_COURT" => "Outils numériques",
"LIBELLE_LONG" => "Formation aux outils numériques",
"CODES_CORRESP_1" => "NUM"
],
2324 => [
"LIBELLE_COURT" => "Géographie",
"LIBELLE_LONG" => "Géographie, aménagement de l'espace (Regroupement CNU 23 24)",
"CODES_CORRESP_1" => "2324,23,24",
"CODES_CORRESP_2" => "23,24"
],
"03" => [
"LIBELLE_COURT" => "Hist Droit",
"LIBELLE_LONG" => "Histoire du droit et des institutions",
"CODES_CORRESP_1" => "03",
"CODES_CORRESP_2" => "03"
],
2122 => [
"LIBELLE_COURT" => "Histoire",
"LIBELLE_LONG" => "Histoire et civilisations (Regroupement CNU 21 22)",
"CODES_CORRESP_1" => "2122,21,22",
"CODES_CORRESP_2" => "21,22",
"CODES_CORRESP_4" => "1000"
],
27 => [
"LIBELLE_COURT" => "Info",
"LIBELLE_LONG" => "Informatique",
"CODES_CORRESP_1" => "27",
"CODES_CORRESP_2" => "27",
"CODES_CORRESP_4" => "5500,8030"
],
"09" => [
"LIBELLE_COURT" => "LL francse",
"LIBELLE_LONG" => "Langue et littérature françaises",