// //////////////////////////////////////////////////////////////////////////////////////////////////// if( ($ACTION!='imprimer') || ($etape!=1) ) { exit('Erreur avec les données transmises !'); } // Récupérer les saisies déjà effectuées pour le bilan officiel concerné // Initialiser les signatures numériques $tab_saisie = array(); // [eleve_id][rubrique_id][prof_id] => array(prof_info,appreciation,note); $tab_signature = array(0=>NULL); // [prof_id] => array(contenu,format,largeur,hauteur); $tab_assiduite = array_fill_keys( $tab_eleve_id , array( 'absence' => NULL , 'absence_nj' => NULL , 'retard' => NULL , 'retard_nj' => NULL ) ); // [eleve_id] => array(absence,absence_nj,retard,retard_nj); $tab_moyenne_exception_matieres = ( ($BILAN_TYPE!='bulletin') || !$_SESSION['OFFICIEL']['BULLETIN_MOYENNE_EXCEPTION_MATIERES'] ) ? array() : explode(',',$_SESSION['OFFICIEL']['BULLETIN_MOYENNE_EXCEPTION_MATIERES']) ; $tab_prof_id = array(); $DB_TAB = DB_STRUCTURE_OFFICIEL::DB_recuperer_bilan_officiel_saisies_eleves( $BILAN_TYPE , $periode_id , $liste_eleve_id , 0 /*prof_id*/ , FALSE /*with_rubrique_nom*/ , FALSE /*with_periodes_avant*/ , FALSE /*only_synthese_generale*/ ); foreach($DB_TAB as $DB_ROW) { $prof_info = ($DB_ROW['prof_id']) ? afficher_identite_initiale( $DB_ROW['user_nom'] , FALSE , $DB_ROW['user_prenom'] , TRUE , $DB_ROW['user_genre'] ) : '' ; $note = in_array($DB_ROW['rubrique_id'],$tab_moyenne_exception_matieres) ? NULL : $DB_ROW['saisie_note'] ; $tab_saisie[$DB_ROW['eleve_id']][$DB_ROW['rubrique_id']][$DB_ROW['prof_id']] = array( 'prof_info'=>$prof_info , 'appreciation'=>$DB_ROW['saisie_appreciation'] , 'note'=>$note ); $tab_signature[$DB_ROW['prof_id']] = NULL ; // Initialisé $tab_prof_id[$DB_ROW['prof_id']] = $DB_ROW['prof_id']; // Pour savoir ensuite la liste des profs à chercher } $DB_TAB = DB_STRUCTURE_OFFICIEL::DB_recuperer_bilan_officiel_saisies_classe( $BILAN_TYPE , $periode_id , $classe_id , 0 /*prof_id*/ , FALSE /*with_periodes_avant*/ , FALSE /*only_synthese_generale*/ ); foreach($DB_TAB as $DB_ROW) { $prof_info = ($DB_ROW['prof_id']) ? afficher_identite_initiale( $DB_ROW['user_nom'] , FALSE , $DB_ROW['user_prenom'] , TRUE , $DB_ROW['user_genre'] ) : '' ; $note = in_array($DB_ROW['rubrique_id'],$tab_moyenne_exception_matieres) ? NULL : $DB_ROW['saisie_note'] ; $tab_saisie[0][$DB_ROW['rubrique_id']][$DB_ROW['prof_id']] = array( 'prof_info'=>$prof_info , 'appreciation'=>$DB_ROW['saisie_appreciation'] , 'note'=>$note ); }
} else { $tab_eleve_id_tmp = array(); $DB_TAB = DB_STRUCTURE_COMMUN::DB_lister_users_regroupement('eleve', 1, 'classe', $classe_id, 'alpha'); foreach ($DB_TAB as $DB_ROW) { $tab_eleve_id_tmp[] = $DB_ROW['user_id']; } $liste_eleve_id_tmp = implode(',', $tab_eleve_id_tmp); } calculer_et_enregistrer_moyennes_eleves_bulletin($periode_id, $classe_id, $liste_eleve_id_tmp, $liste_rubrique_id, $_SESSION['OFFICIEL']['BULLETIN_RETROACTIF'], FALSE, FALSE); } // Récupérer les saisies déjà effectuées pour le bilan officiel concerné $tab_saisie = array(); // [eleve_id][rubrique_id][prof_id] => array(prof_info,appreciation,note); $tab_moyenne_exception_matieres = $BILAN_TYPE != 'bulletin' || !$_SESSION['OFFICIEL']['BULLETIN_MOYENNE_EXCEPTION_MATIERES'] ? array() : explode(',', $_SESSION['OFFICIEL']['BULLETIN_MOYENNE_EXCEPTION_MATIERES']); // sert plus tard $DB_TAB = DB_STRUCTURE_OFFICIEL::DB_recuperer_bilan_officiel_saisies_eleves($BILAN_TYPE, $periode_id, $liste_eleve_id, 0, FALSE, FALSE, FALSE); foreach ($DB_TAB as $DB_ROW) { $prof_info = $DB_ROW['prof_id'] ? afficher_identite_initiale($DB_ROW['user_nom'], FALSE, $DB_ROW['user_prenom'], TRUE, $DB_ROW['user_genre']) : ''; $tab_saisie[$DB_ROW['eleve_id']][$DB_ROW['rubrique_id']][$DB_ROW['prof_id']] = array('prof_info' => $prof_info, 'appreciation' => $DB_ROW['saisie_appreciation'], 'note' => $DB_ROW['saisie_note']); } // Pas besoin de récupérer les absences / retards $affichage_assiduite = FALSE; // Pas besoin de récupérer les professeurs principaux $affichage_prof_principal = FALSE; // //////////////////////////////////////////////////////////////////////////////////////////////////// // Initialisation de variables supplémentaires // INCLUSION DU CODE COMMUN À PLUSIEURS PAGES // //////////////////////////////////////////////////////////////////////////////////////////////////// $tab_resultat_examen = array(); $make_officiel = TRUE; $make_brevet = FALSE;