示例#1
0
   // Attention ! On doit calculer des moyennes de classe, pas de groupe !
   if(!$is_sous_groupe)
   {
     $liste_eleve_id = implode(',',$tab_eleve_id);
   }
   else
   {
     $tab_eleve_id_tmp = array();
     $DB_TAB = DB_STRUCTURE_COMMUN::DB_lister_users_regroupement( 'eleve' /*profil_type*/ , 1 /*statut*/ , 'classe' , $classe_id , 'alpha' /*eleves_ordre*/ );
     foreach($DB_TAB as $DB_ROW)
     {
       $tab_eleve_id_tmp[] = $DB_ROW['user_id'];
     }
     $liste_eleve_id = implode(',',$tab_eleve_id_tmp);
   }
   calculer_et_enregistrer_moyennes_eleves_bulletin( $periode_id , $classe_id , $liste_eleve_id , '' /*liste_matiere_id*/ , $_SESSION['OFFICIEL']['BULLETIN_ONLY_SOCLE'] , $_SESSION['OFFICIEL']['BULLETIN_RETROACTIF'] , $_SESSION['OFFICIEL']['BULLETIN_MOYENNE_CLASSE'] , $_SESSION['OFFICIEL']['BULLETIN_MOYENNE_GENERALE'] );
 }
 // lister les bilans officiels archivés de l'année courante, affichage du retour
 $DB_TAB = DB_STRUCTURE_OFFICIEL::DB_lister_bilan_officiel_fichiers( $BILAN_TYPE , $periode_id , $tab_eleve_id );
 $_SESSION['tmp_droit_voir_archive'] = array(); // marqueur mis en session pour vérifier que c'est bien cet utilisateur qui veut voir (et à donc le droit de voir) le fichier, car il n'y a pas d'autre vérification de droit ensuite
 foreach($tab_eleve_id as $eleve_id)
 {
   if($OBJET=='imprimer')
   {
     $checked            = (isset($DB_TAB[$eleve_id])) ? '' : ' checked' ;
     $td_date_generation = (isset($DB_TAB[$eleve_id])) ? 'Oui, le '.convert_date_mysql_to_french($DB_TAB[$eleve_id][0]['fichier_date_generation']) : 'Non' ;
     echo'<tr id="id_'.$eleve_id.'">';
     echo'<td class="nu"><input type="checkbox" name="f_ids" value="'.$eleve_id.'"'.$checked.' /></td>';
     echo'<td class="label">'.$tab_eleve_td[$eleve_id].'</td>';
     echo'<td class="label hc">'.$td_date_generation.'</td>';
     echo'</tr>';
示例#2
0
  // Attention ! On doit calculer des moyennes de classe, pas de groupe !
  if(!$is_sous_groupe)
  {
    $liste_eleve_id_tmp = $liste_eleve_id;
  }
  else
  {
    $tab_eleve_id_tmp = array();
    $DB_TAB = DB_STRUCTURE_COMMUN::DB_lister_users_regroupement( 'eleve' /*profil_type*/ , 1 /*statut*/ , 'classe' , $classe_id , 'alpha' /*eleves_ordre*/ );
    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_ONLY_SOCLE'] , $_SESSION['OFFICIEL']['BULLETIN_RETROACTIF'] , FALSE /*memo_moyennes_classe*/ , FALSE /*memo_moyennes_generale*/ );
}

// 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 /*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'] ) : '' ;
  $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
// - pour une maîtrise du socle on peut se restreindre à ce qui contient des éléments
// Du coup le plus simple est de simuler la génération du document, sans sortie html / pdf, mais en notant au fur et à mesure ce qui manque
// (re)calculer les moyennes des élèves
if ($BILAN_TYPE == 'bulletin' && $_SESSION['OFFICIEL']['BULLETIN_MOYENNE_SCORES']) {
    // Attention ! On doit calculer des moyennes de classe, pas de groupe !
    if (!$is_sous_groupe) {
        $liste_eleve_id_tmp = $liste_eleve_id;
    } 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;
	// Attention ! On doit calculer des moyennes de classe, pas de groupe !
	if(!$is_sous_groupe)
	{
		$liste_eleve_id_tmp = $liste_eleve_id;
	}
	else
	{
		$tab_eleve_id_tmp = array();
		$DB_TAB = DB_STRUCTURE_COMMUN::DB_lister_users_regroupement( 'eleve' , 1 /*statut*/ , 'classe' , $classe_id );
		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 , FALSE /*memo_moyennes_classe*/ , FALSE /*memo_moyennes_generale*/ );
}

// 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,info);
$DB_TAB = DB_STRUCTURE_OFFICIEL::DB_recuperer_bilan_officiel_saisies( $BILAN_TYPE , $periode_id , $liste_eleve_id , 0 /*prof_id*/ );
foreach($DB_TAB as $DB_ROW)
{
	$tab_saisie[$DB_ROW['eleve_id']][$DB_ROW['rubrique_id']][$DB_ROW['prof_id']] = array( 'prof_info'=>$DB_ROW['prof_info'] , 'appreciation'=>$DB_ROW['saisie_appreciation'] , 'note'=>$DB_ROW['saisie_note'] );
}

//	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
// Initialisation de variables supplémentaires
// INCLUSION DU CODE COMMUN À PLUSIEURS PAGES
//	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-