// Finalisation de l'export HTML $export_html.= '</div>'.NL; // Affichage echo'<ul class="puce"><li><a target="_blank" href="./force_download.php?fichier='.$fnom.'.csv"><span class="file file_txt">Récupérer l\'arborescence (fichier <em>csv</em></span>).</a></li></ul>'.NL; echo $export_html; exit(); } // //////////////////////////////////////////////////////////////////////////////////////////////////// // Export CSV des liens des matières rattachés aux liens du socle // //////////////////////////////////////////////////////////////////////////////////////////////////// if( ($type_export=='jointure_socle_matiere') && $palier_id && $palier_nom ) { Form::save_choix('palier'); // Préparation de l'export CSV $separateur = ';'; $export_csv = 'PALIER SOCLE'.$separateur.'PILIER SOCLE'.$separateur.'SECTION SOCLE'.$separateur.'ITEM SOCLE'.$separateur.'ITEM MATIERE'."\r\n\r\n"; // Préparation de l'export HTML $export_html = '<div id="zone_paliers" class="arbre_dynamique p">'.NL; // Récupération des données du socle $tab_pilier = array(); $tab_section = array(); $tab_socle = array(); $pilier_id = 0; $DB_TAB = DB_STRUCTURE_COMMUN::DB_recuperer_arborescence_palier($palier_id); foreach($DB_TAB as $DB_ROW) { if($DB_ROW['pilier_id']!=$pilier_id)
$legende = isset($_POST['f_legende']) ? Clean::texte($_POST['f_legende']) : ''; $marge_min = isset($_POST['f_marge_min']) ? Clean::entier($_POST['f_marge_min']) : 0; $eleves_ordre = isset($_POST['f_eleves_ordre']) ? Clean::texte($_POST['f_eleves_ordre']) : ''; // Normalement ce sont des tableaux qui sont transmis, mais au cas où... $tab_pilier_id = isset($_POST['f_pilier']) ? is_array($_POST['f_pilier']) ? $_POST['f_pilier'] : explode(',', $_POST['f_pilier']) : array(); $tab_eleve_id = isset($_POST['f_eleve']) ? is_array($_POST['f_eleve']) ? $_POST['f_eleve'] : explode(',', $_POST['f_eleve']) : array(); $tab_matiere_id = isset($_POST['f_matiere']) ? is_array($_POST['f_matiere']) ? $_POST['f_matiere'] : explode(',', $_POST['f_matiere']) : array(); $tab_pilier_id = array_filter(Clean::map_entier($tab_pilier_id), 'positif'); $tab_eleve_id = array_filter(Clean::map_entier($tab_eleve_id), 'positif'); $tab_matiere_id = array_filter(Clean::map_entier($tab_matiere_id), 'positif'); $memo_demande = count($tab_pilier_id) > 1 ? 'palier' : 'pilier'; $liste_eleve = implode(',', $tab_eleve_id); if (!$palier_id || !$palier_nom || !$groupe_id || !$groupe_nom || !$groupe_type || !count($tab_eleve_id) || !count($tab_pilier_id) || !in_array($type, array('pourcentage', 'validation')) || !in_array($mode, array('auto', 'manuel')) || !$couleur || !$fond || !$legende || !$marge_min || !$eleves_ordre) { exit('Erreur avec les données transmises !'); } Form::save_choix('releve_synthese_socle'); Erreur500::prevention_et_gestion_erreurs_fatales(TRUE, FALSE); $tab_pilier = array(); // [pilier_id] => array(pilier_ref,pilier_nom,pilier_nb_entrees); $tab_socle = array(); // [pilier_id][socle_id] => array(section_nom,socle_nom); $tab_entree_id = array(); // [i] => entree_id $tab_eleve_infos = array(); // [eleve_id] => array(eleve_nom,eleve_prenom,eleve_langue) $tab_eval = array(); // [eleve_id][socle_id][item_id][]['note'] => note [type "pourcentage" uniquement] $tab_item = array(); // [item_id] => array(calcul_methode,calcul_limite); [type "pourcentage" uniquement] $tab_user_entree = array(); // [eleve_id][entree_id] => array(etat,date,info); [type "validation" uniquement]
{ $remplissage = 'plein'; $colonne_bilan = 'oui'; $colonne_vide = 0; } // Si pas grille générique et si notes demandées ou besoin pour colonne bilan ou besoin pour synthèse $besoin_notes = ( !$type_generique && ( ($remplissage=='plein') || ($colonne_bilan=='oui') || $type_synthese ) ) ? TRUE : FALSE ; if( !$matiere_id || ( !$type_generique && (!$groupe_id || !$groupe_nom || !$groupe_type) ) || !$niveau_id || !$matiere_nom || !$niveau_nom || !$remplissage || !$colonne_bilan || ( $besoin_notes && !$periode_id && (!$date_debut || !$date_fin) ) || ( $besoin_notes && !$retroactif ) || !$orientation || !$couleur || !$fond || !$legende || !$marge_min || !$pages_nb || ($cases_nb<0) || !$cases_largeur || !count($tab_type) || !$eleves_ordre ) { exit('Erreur avec les données transmises !'); } // Enregistrer les préférences utilisateurs Form::save_choix('grille_referentiel'); if($type_generique) { $remplissage = 'vide'; $colonne_bilan = 'non'; $colonne_vide = 0; $type_individuel = 0 ; $type_synthese = 0 ; } Erreur500::prevention_et_gestion_erreurs_fatales( TRUE /*memory*/ , FALSE /*time*/ ); // Initialisation de tableaux $tab_domaine = array(); // [domaine_id] => array(domaine_ref,domaine_nom,domaine_nb_lignes);
$fond = (isset($_POST['f_fond'])) ? Clean::texte($_POST['f_fond']) : ''; $legende = (isset($_POST['f_legende'])) ? Clean::texte($_POST['f_legende']) : ''; $marge_min = (isset($_POST['f_marge_min'])) ? Clean::entier($_POST['f_marge_min']) : 0; $eleves_ordre = (isset($_POST['f_eleves_ordre'])) ? Clean::texte($_POST['f_eleves_ordre']) : ''; // Normalement c'est un tableau qui est transmis, mais au cas où... $tab_eleve = (isset($_POST['f_eleve'])) ? ( (is_array($_POST['f_eleve'])) ? $_POST['f_eleve'] : explode(',',$_POST['f_eleve']) ) : array() ; $tab_eleve = array_filter( Clean::map_entier($tab_eleve) , 'positif' ); $liste_eleve = implode(',',$tab_eleve); if( !$groupe_id || !$groupe_nom || !$groupe_type || !count($tab_eleve) || ( !$periode_id && (!$date_debut || !$date_fin) ) || !$retroactif || !$couleur || !$fond || !$legende || !$marge_min || !$eleves_ordre ) { exit('Erreur avec les données transmises !'); } Form::save_choix('synthese_multimatiere'); $marge_gauche = $marge_droite = $marge_haut = $marge_bas = $marge_min ; // //////////////////////////////////////////////////////////////////////////////////////////////////// // INCLUSION DU CODE COMMUN À PLUSIEURS PAGES // //////////////////////////////////////////////////////////////////////////////////////////////////// $make_officiel = FALSE; $make_brevet = FALSE; $make_action = ''; $make_html = TRUE; $make_pdf = TRUE; $make_graph = FALSE; require(CHEMIN_DOSSIER_INCLUDE.'noyau_items_synthese.php');
$eleves_ordre = (isset($_POST['f_eleves_ordre'])) ? Clean::texte($_POST['f_eleves_ordre']) : ''; // Normalement ce sont des tableaux qui sont transmis, mais au cas où... $tab_pilier = (isset($_POST['f_pilier'])) ? ( (is_array($_POST['f_pilier'])) ? $_POST['f_pilier'] : explode(',',$_POST['f_pilier']) ) : array() ; $tab_eleve = (isset($_POST['f_eleve'])) ? ( (is_array($_POST['f_eleve'])) ? $_POST['f_eleve'] : explode(',',$_POST['f_eleve']) ) : array() ; $tab_pilier = array_filter( Clean::map_entier($tab_pilier) , 'positif' ); $tab_eleve = array_filter( Clean::map_entier($tab_eleve) , 'positif' ); $listing_eleve_id = implode(',',$tab_eleve); // //////////////////////////////////////////////////////////////////////////////////////////////////// // Afficher le tableau avec les états de validations ET NE CONSERVER QUE LES VALIDATIONS POSITIVES // //////////////////////////////////////////////////////////////////////////////////////////////////// if( ($action=='Afficher_bilan') && $palier_id && count($tab_pilier) && count($tab_eleve) && $groupe_type && $eleves_ordre ) { Form::save_choix('validation_socle_pilier'); $affichage = ''; // Tableau des langues $tfoot = ''; require(CHEMIN_DOSSIER_INCLUDE.'tableau_langues_socle.php'); // Récupérer les données des élèves $eleves_ordre = ($groupe_type=='Classes') ? 'alpha' : $eleves_ordre ; $tab_eleve_infos = DB_STRUCTURE_BILAN::DB_lister_eleves_cibles( $listing_eleve_id , $eleves_ordre , FALSE /*with_gepi*/ , TRUE /*with_langue*/ , FALSE /*with_brevet_serie*/ ); if(!is_array($tab_eleve_infos)) { exit('Aucun élève trouvé correspondant aux identifiants transmis !'); } // Afficher la première ligne du tableau avec les étiquettes des élèves $tab_eleve_id = array(); // listing des ids des élèves mis à jour au cas où la récupération dans la base soit différente des ids transmis... $affichage .= '<thead><tr>'; foreach($tab_eleve_infos as $eleve_id => $tab_eleve)
} if($_SESSION['USER_PROFIL_TYPE']=='eleve') { $groupe_id = $_SESSION['ELEVE_CLASSE_ID']; $groupe_nom = $_SESSION['ELEVE_CLASSE_NOM']; $tab_eleve = array($_SESSION['USER_ID']); } */ $type_individuel = in_array('individuel', $tab_type) ? 1 : 0; $type_synthese = in_array('synthese', $tab_type) ? 1 : 0; $type_bulletin = in_array('bulletin', $tab_type) ? 1 : 0; $liste_eleve = implode(',', $tab_eleve); if (!$orientation || !$couleur || !$fond || !$legende || !$marge_min || !$pages_nb || $cases_nb < 0 || !$cases_largeur || !$periode_id && (!$date_debut || !$date_fin) || !$retroactif || !$matiere_id || !$groupe_id || !$groupe_nom || !$groupe_type || !count($tab_eleve) || !count($tab_type) || !$eleves_ordre) { exit('Erreur avec les données transmises !'); } Form::save_choix('items_selection'); $marge_gauche = $marge_droite = $marge_haut = $marge_bas = $marge_min; // //////////////////////////////////////////////////////////////////////////////////////////////////// // INCLUSION DU CODE COMMUN À PLUSIEURS PAGES // //////////////////////////////////////////////////////////////////////////////////////////////////// $make_officiel = FALSE; $make_brevet = FALSE; $make_action = ''; $make_html = TRUE; $make_pdf = TRUE; $make_csv = FALSE; $make_graph = FALSE; require CHEMIN_DOSSIER_INCLUDE . 'noyau_items_releve.php'; // //////////////////////////////////////////////////////////////////////////////////////////////////// // On retourne les résultats // ////////////////////////////////////////////////////////////////////////////////////////////////////
'pourcentage_acquis' => "Pourcentage d'items acquis", ); if( !isset($tab_objet[$objet]) || !isset($tab_indicateur[$indicateur]) || ( ($objet=='matieres') && !$liste_matiere_id ) || ( ($objet=='matiere_niveau') && ( !$matiere_id || !$matiere_nom ) ) || ( ($objet=='matiere_synthese') && ( !$matiere_id || !$matiere_nom || !$mode_synthese ) ) || ( ($objet=='selection') && !$liste_item_id ) || !$groupe_id || !$groupe_type || !$eleve_id || ( !$periode_id && (!$date_debut || !$date_fin) ) || !$retroactif || !$eleves_ordre || !$echelle ) { exit('Erreur avec les données transmises !'); } Form::save_choix('bilan_chronologique'); if($objet=='selection') { $indicateur = 'moyenne_scores'; $conversion_sur_20 = 0; } Erreur500::prevention_et_gestion_erreurs_fatales( TRUE /*memory*/ , FALSE /*time*/ ); // Initialisation de tableaux $tab_item = array(); // [item_id] => array(item_coef,calcul_methode,calcul_limite,calcul_retroactif); $tab_liste_item = array(); // [i] => item_id $tab_rubrique = array(); // [rubrique_id] => rubrique_nom $tab_eval = array(); // [eleve_id][item_id][devoir] => array(note,date,info) On utilise un tableau multidimensionnel vu qu'on ne sait pas à l'avance combien il y a d'évaluations pour un élève et un item donnés.
$eleves_ordre = isset($_POST['f_eleves_ordre']) ? Clean::texte($_POST['f_eleves_ordre']) : ''; // Normalement ce sont des tableaux qui sont transmis, mais au cas où... // De plus pour l'affichage du détail des acquisitions d'un item, f_matiere est transmis comme une chaine concaténée. $tab_eleve = isset($_POST['f_eleve']) ? is_array($_POST['f_eleve']) ? $_POST['f_eleve'] : explode(',', $_POST['f_eleve']) : array(); $tab_domaine = isset($_POST['f_domaine']) ? is_array($_POST['f_domaine']) ? $_POST['f_domaine'] : explode(',', $_POST['f_domaine']) : array(); $tab_matiere = isset($_POST['f_matiere']) ? is_array($_POST['f_matiere']) ? $_POST['f_matiere'] : explode(',', $_POST['f_matiere']) : array(); $tab_eleve = array_filter(Clean::map_entier($tab_eleve), 'positif'); $tab_domaine = array_filter(Clean::map_entier($tab_domaine), 'positif'); $tab_matiere = array_filter(Clean::map_entier($tab_matiere), 'positif'); $listing_eleve_id = implode(',', $tab_eleve); $listing_domaine_id = implode(',', $tab_domaine); // //////////////////////////////////////////////////////////////////////////////////////////////////// // Afficher le tableau avec les états de validations // //////////////////////////////////////////////////////////////////////////////////////////////////// if ($action == 'Afficher_bilan' && $pilier_id && count($tab_domaine) && count($tab_eleve) && in_array($mode, array('auto', 'manuel')) && $groupe_type && $eleves_ordre) { Form::save_choix('validation_socle_item'); $affichage = ''; // Tableau des langues $tfoot = ''; require CHEMIN_DOSSIER_INCLUDE . 'tableau_langues_socle.php'; $test_pilier_langue = in_array($pilier_id, $tab_langue_piliers) ? TRUE : FALSE; // Récupérer les données des élèves $eleves_ordre = $groupe_type == 'Classes' ? 'alpha' : $eleves_ordre; $tab_eleve_infos = DB_STRUCTURE_BILAN::DB_lister_eleves_cibles($listing_eleve_id, $eleves_ordre, FALSE, TRUE, FALSE); if (!is_array($tab_eleve_infos)) { exit('Aucun élève trouvé correspondant aux identifiants transmis !'); } // Afficher la première ligne du tableau avec les étiquettes des élèves puis le nom du groupe et du palier $tab_eleve_id = array(); // listing des ids des élèves mis à jour au cas où la récupération dans la base soit différente des ids transmis... $affichage .= '<thead><tr>';
$groupe_nom = $_SESSION['ELEVE_CLASSE_NOM']; $tab_eleve = array($_SESSION['USER_ID']); } $type_individuel = (in_array('individuel',$tab_type)) ? 1 : 0 ; $type_synthese = (in_array('synthese',$tab_type)) ? 1 : 0 ; $type_bulletin = (in_array('bulletin',$tab_type)) ? 1 : 0 ; $liste_eleve = implode(',',$tab_eleve); if( !$orientation || !$couleur || !$fond || !$legende || !$marge_min || !$pages_nb || ($cases_nb<0) || !$cases_largeur || ( !$periode_id && (!$date_debut || !$date_fin) ) || !$retroactif || !$matiere_id || !$matiere_nom || !$groupe_id || !$groupe_nom || !$groupe_type || !count($tab_eleve) || !count($tab_type) || !$eleves_ordre ) { exit('Erreur avec les données transmises !'); } Form::save_choix('items_matiere'); $marge_gauche = $marge_droite = $marge_haut = $marge_bas = $marge_min ; // //////////////////////////////////////////////////////////////////////////////////////////////////// // INCLUSION DU CODE COMMUN À PLUSIEURS PAGES // //////////////////////////////////////////////////////////////////////////////////////////////////// $make_officiel = FALSE; $make_brevet = FALSE; $make_action = ''; $make_html = TRUE; $make_pdf = TRUE; $make_csv = FALSE; $make_graph = FALSE;
$liste_eleve = implode(',',$tab_eleve); $tab_modele = array( 'matiere' => TRUE, 'multimatiere' => TRUE, 'selection' => TRUE, 'professeur' => TRUE, ); if( !isset($tab_modele[$releve_modele]) || !$orientation || !$couleur || !$fond || !$legende || !$marge_min || !$pages_nb || ($cases_nb<0) || !$cases_largeur || ( !$periode_id && (!$date_debut || !$date_fin) ) || !$retroactif || ( ($releve_modele=='matiere') && ( !$matiere_id || !$matiere_nom ) ) || ( ($releve_modele=='professeur') && !$prof_id ) || ( ($releve_modele=='selection') && !count($tab_items) ) || !$groupe_id || !$groupe_nom || !$groupe_type || !count($tab_eleve) || !count($tab_type) || !$eleves_ordre ) { exit('Erreur avec les données transmises !'); } Form::save_choix('releve_items'); $marge_gauche = $marge_droite = $marge_haut = $marge_bas = $marge_min ; // //////////////////////////////////////////////////////////////////////////////////////////////////// // INCLUSION DU CODE COMMUN À PLUSIEURS PAGES // //////////////////////////////////////////////////////////////////////////////////////////////////// $make_officiel = FALSE; $make_brevet = FALSE; $make_action = ''; $make_html = TRUE; $make_pdf = TRUE; $make_csv = ( ($releve_modele=='multimatiere') && ($releve_individuel_format == 'eleve') ) ? TRUE : FALSE ; $make_graph = FALSE;
else { exit('Erreur : vous n\'êtes ni propriétaire ni bénéficiaire de droits sur le devoir n°'.$devoir_id.' !'); } // Mise à jour dans la base DB_STRUCTURE_PROFESSEUR::DB_modifier_ordre_item( $devoir_id , $tab_id ); exit('<ok>'); } // //////////////////////////////////////////////////////////////////////////////////////////////////// // Imprimer un cartouche d'une évaluation // //////////////////////////////////////////////////////////////////////////////////////////////////// if( ($action=='imprimer_cartouche') && $devoir_id && $groupe_id && $date_fr && $description && $cart_detail && in_array($cart_cases_nb,array(1,5)) && $cart_contenu && $orientation && $marge_min && $couleur && $fond && in_array($eleves_ordre,array('alpha','classe')) ) { Form::save_choix('evaluation_cartouche'); $with_nom = (substr($cart_contenu,0,8)=='AVEC_nom') ? TRUE : FALSE ; $with_result = (substr($cart_contenu,9)=='AVEC_result') ? TRUE : FALSE ; // liste des items $DB_TAB_COMP = DB_STRUCTURE_PROFESSEUR::DB_lister_devoir_items( $devoir_id , FALSE /*with_lien*/ , TRUE /*with_coef*/ ); // liste des élèves $DB_TAB_USER = DB_STRUCTURE_COMMUN::DB_lister_users_regroupement( 'eleve' /*profil_type*/ , 1 /*statut*/ , $groupe_type , $groupe_id , $eleves_ordre ); // Let's go if(empty($DB_TAB_COMP)) { exit('Aucun item n\'est associé à cette évaluation !'); } if(empty($DB_TAB_USER)) { exit('Aucun élève n\'est associé à cette évaluation !'); }
$groupe_nom = $_SESSION['ELEVE_CLASSE_NOM']; $tab_eleve = array($_SESSION['USER_ID']); } $type_individuel = (in_array('individuel',$tab_type)) ? 1 : 0 ; $type_synthese = (in_array('synthese',$tab_type)) ? 1 : 0 ; $type_bulletin = (in_array('bulletin',$tab_type)) ? 1 : 0 ; $liste_eleve = implode(',',$tab_eleve); if( !$orientation || !$couleur || !$fond || !$legende || !$marge_min || !$pages_nb || ($cases_nb<0) || !$cases_largeur || ( !$periode_id && (!$date_debut || !$date_fin) ) || !$retroactif || !$matiere_id || !$groupe_id || !$groupe_nom || !$groupe_type || !count($tab_eleve) || !count($tab_type) || !$prof_id || !$eleves_ordre ) { exit('Erreur avec les données transmises !'); } Form::save_choix('items_professeur'); $marge_gauche = $marge_droite = $marge_haut = $marge_bas = $marge_min ; // //////////////////////////////////////////////////////////////////////////////////////////////////// // INCLUSION DU CODE COMMUN À PLUSIEURS PAGES // //////////////////////////////////////////////////////////////////////////////////////////////////// $make_officiel = FALSE; $make_brevet = FALSE; $make_action = ''; $make_html = TRUE; $make_pdf = TRUE; $make_csv = FALSE; $make_graph = FALSE;
$tab_eleve_id = array_filter(Clean::map_entier($tab_eleve_id), 'positif'); $tab_matiere_id = array_filter(Clean::map_entier($tab_matiere_id), 'positif'); // En cas de manipulation du formulaire (avec Firebug par exemple) ; on pourrait aussi vérifier pour un parent que c'est bien un de ses enfants... if (in_array($_SESSION['USER_PROFIL_TYPE'], array('parent', 'eleve'))) { $aff_socle_PA = test_user_droit_specifique($_SESSION['DROIT_SOCLE_POURCENTAGE_ACQUIS']) ? $aff_socle_PA : 0; $aff_socle_EV = test_user_droit_specifique($_SESSION['DROIT_SOCLE_ETAT_VALIDATION']) ? $aff_socle_EV : 0; $only_presence = 0; } if ($_SESSION['USER_PROFIL_TYPE'] == 'eleve') { $groupe_id = $_SESSION['ELEVE_CLASSE_ID']; $tab_eleve_id = array($_SESSION['USER_ID']); } if (!$palier_id || !$palier_nom || $groupe_id && (!$groupe_nom || !$groupe_type) || !count($tab_pilier_id) || !in_array($mode, array('auto', 'manuel')) || !$couleur || !$fond || !$legende || !$marge_min || !$eleves_ordre) { exit('Erreur avec les données transmises !'); } Form::save_choix('releve_socle'); $marge_gauche = $marge_droite = $marge_haut = $marge_bas = $marge_min; // //////////////////////////////////////////////////////////////////////////////////////////////////// // INCLUSION DU CODE COMMUN À PLUSIEURS PAGES // //////////////////////////////////////////////////////////////////////////////////////////////////// $make_officiel = FALSE; $make_brevet = FALSE; $make_action = ''; $make_html = TRUE; $make_pdf = TRUE; $make_graph = FALSE; require CHEMIN_DOSSIER_INCLUDE . 'noyau_socle_releve.php'; // //////////////////////////////////////////////////////////////////////////////////////////////////// // Affichage du résultat // //////////////////////////////////////////////////////////////////////////////////////////////////// if ($affichage_direct) {