if(isset($current_aid)) { $texte_per=$current_aid['classlist_string']." - ".$periode; //$texte_per=$current_group['classlist_string']; } else { $texte_per=$periode; } $pdf->CellFitScale($L_entete_discipline,$H_entete_classe ,$texte_per,'TLBR',2,'C'); } */ $pdf->CellFitScale($L_entete_discipline, $H_entete_classe, $current_aid['classlist_string'], 'TLBR', 2, 'C'); } else { $sql = "SELECT professeur FROM j_eleves_professeurs WHERE (login = '******'login'] . "' and id_classe='{$id_classe}')"; $call_profsuivi_eleve = mysqli_query($GLOBALS["mysqli"], $sql); $current_eleve_profsuivi_login = @old_mysql_result($call_profsuivi_eleve, '0', 'professeur'); $gepi_prof_suivi = getParamClasse($id_classe, 'gepi_prof_suivi', getSettingValue('gepi_prof_suivi')); $pdf->CellFitScale($L_entete_classe, $H_entete_classe / 2, ucfirst($gepi_prof_suivi) . ' : ' . affiche_utilisateur($current_eleve_profsuivi_login, $id_classe), 'LRB', 0, 'L'); //'Année scolaire '.getSettingValue('gepiYear') } } else { // On n'affiche pas le PP (il peut y en avoir plusieurs) ==> on affiche la période if ($id_groupe != NULL) { $current_group = get_group($id_groupe); $sql = "SELECT num_periode,nom_periode FROM periodes WHERE id_classe='{$id_classe}' AND num_periode='{$id_periode}' ORDER BY num_periode"; $res_per = mysqli_query($GLOBALS["mysqli"], $sql); if (mysqli_num_rows($res_per) == 0) { die("Problème avec les infos de la classe {$id_classe}</body></html>"); } else { $lig_tmp = mysqli_fetch_object($res_per); $periode = $lig_tmp->nom_periode; if (isset($current_group)) {
echo "</td>\n"; for ($i = 0; $i < count($tab_id_classe); $i++) { echo "<td>\n"; echo "<label for='" . $tab_item[$k] . "_" . $i . "' class='invisible'>" . $tab_traduc[$tab_item[$k]] . "</label>\n\t\t\t\t\t<input type='checkbox' name='" . $tab_item[$k] . "[{$i}]' id='" . $tab_item[$k] . "_" . $i . "' value='y' "; if (!in_array($tab_item[$k], $tab_param_table_classes_param)) { $sql = "SELECT * FROM classes WHERE id='" . $tab_id_classe[$i] . "';"; $res_class_tmp = mysqli_query($GLOBALS["mysqli"], $sql); if (mysqli_num_rows($res_class_tmp) > 0) { $lig_class_tmp = mysqli_fetch_object($res_class_tmp); if ($lig_class_tmp->{$tab_item}[$k] == "y") { echo "checked ='checked' "; } //$tmp_champ=$tab_item[$k]; //if($lig_class_tmp->$tmp_champ=="y") {echo "checked ='checked' ";} } } elseif (getParamClasse($tab_id_classe[$i], $tab_item[$k], '') == "y") { echo "checked ='checked' "; } echo "/>\n"; echo "</td>\n"; } echo "<td>\n"; echo "<a href=\"javascript:CocheLigne('" . $tab_item[$k] . "')\"><img src='../images/enabled.png' width='15' height='15' alt='Tout cocher' /></a> / <a href=\"javascript:DecocheLigne('" . $tab_item[$k] . "')\"><img src='../images/disabled.png' width='15' height='15' alt='Tout décocher' /></a>"; echo "</td>\n"; echo "</tr>\n"; } } //$tab_item[]='rn_app'; //$tab_traduc['rn_app']="Avec l'appréciation (sous réserve d'autorisation par le professeur)"; $alt = $alt * -1; echo "<tr class='lig{$alt} white_hover'>\n";
function afficher_liste_profs_du_groupe($reg_matiere) { global $current_group, $p, $prof_list, $mode, $themessage, $reg_professeurs, $id_classe; // Récupération du prof principal $tab_prof_suivi = array(); $nb_prof_suivi = 0; if (isset($id_classe)) { $tab_prof_suivi = get_tab_prof_suivi($id_classe); $nb_prof_suivi = count($tab_prof_suivi); if ($nb_prof_suivi > 1) { $liste_prof_suivi = ""; for ($loop = 0; $loop < count($tab_prof_suivi); $loop++) { if ($loop > 0) { $liste_prof_suivi .= ", "; } $liste_prof_suivi .= civ_nom_prenom($tab_prof_suivi[$loop]); } } $gepi_prof_suivi = getParamClasse($id_classe, 'gepi_prof_suivi', getSettingValue('gepi_prof_suivi')); } else { $gepi_prof_suivi = getSettingValue('gepi_prof_suivi'); } $sql = "SELECT u.login, u.nom, u.prenom, u.civilite, u.statut FROM utilisateurs u, j_professeurs_matieres j WHERE (j.id_matiere = '{$reg_matiere}' and j.id_professeur = u.login and u.etat!='inactif') ORDER BY u.nom;"; //echo "$sql<br />"; $calldata = mysqli_query($GLOBALS["mysqli"], $sql); $nb = mysqli_num_rows($calldata); $prof_list = array(); $prof_list["list"] = array(); for ($i = 0; $i < $nb; $i++) { $prof_login = old_mysql_result($calldata, $i, "login"); $prof_nom = old_mysql_result($calldata, $i, "nom"); $prof_prenom = old_mysql_result($calldata, $i, "prenom"); $civilite = old_mysql_result($calldata, $i, "civilite"); $prof_statut = old_mysql_result($calldata, $i, "statut"); $prof_list["list"][] = $prof_login; $prof_list["users"][$prof_login] = array("login" => $prof_login, "nom" => casse_mot($prof_nom, 'maj'), "prenom" => casse_mot($prof_prenom, 'majf2'), "civilite" => $civilite, "statut" => $prof_statut); } if (count($prof_list["list"]) == "0") { echo "<p><span style='color:red'>ERREUR !</span> Aucun professeur n'a été défini comme compétent dans la matière considérée.<br /><a href='../matieres/modify_matiere.php?current_matiere={$reg_matiere}'>Associer des professeurs à {$reg_matiere}</a></p>\n"; } else { $total_profs = array_merge($prof_list["list"], $reg_professeurs); $total_profs = array_unique($total_profs); $p = 0; echo "<table class='boireaus'>\n"; $alt = 1; $temoin_nettoyage_requis = 'n'; foreach ($total_profs as $prof_login) { $alt = $alt * -1; if (isset($prof_list["users"][$prof_login]["statut"]) && $prof_list["users"][$prof_login]["statut"] == 'professeur') { echo "<tr class='lig{$alt}'>\n"; echo "<td>\n"; echo "<input type='hidden' name='proflogin_" . $p . "' value='" . $prof_login . "' />\n"; echo "<input type='checkbox' name='prof_" . $p . "' id='prof_" . $p . "' "; echo "onchange='checkbox_change({$p});changement();'"; if (in_array($prof_login, $reg_professeurs)) { if (array_key_exists($prof_login, $current_group["profs"]["users"])) { echo " checked />\n"; echo "</td>\n"; echo "<td style='text-align:left;'>\n"; echo "<label id='civ_nom_prenom_prof_{$p}' for='prof_" . $p . "' style='cursor: pointer;'>" . $current_group["profs"]["users"][$prof_login]["civilite"] . " " . $current_group["profs"]["users"][$prof_login]["nom"] . " " . $current_group["profs"]["users"][$prof_login]["prenom"] . "</label>\n"; } else { echo " checked />\n"; echo "</td>\n"; echo "<td style='text-align:left;'>\n"; echo "<label id='civ_nom_prenom_prof_{$p}' for='prof_" . $p . "' style='cursor: pointer;'>" . $prof_list["users"][$prof_login]["civilite"] . " " . $prof_list["users"][$prof_login]["nom"] . " " . $prof_list["users"][$prof_login]["prenom"] . "</label>\n"; } } else { echo " />\n"; echo "</td>\n"; echo "<td style='text-align:left;'>\n"; echo "<label id='civ_nom_prenom_prof_{$p}' for='prof_" . $p . "' style='cursor: pointer;'>" . $prof_list["users"][$prof_login]["civilite"] . " " . $prof_list["users"][$prof_login]["nom"] . " " . $prof_list["users"][$prof_login]["prenom"] . "</label>"; } if (in_array($prof_login, $tab_prof_suivi)) { echo " <img src='../images/bulle_verte.png' width='9' height='9' title=\"" . ucfirst($gepi_prof_suivi) . " d'au moins un élève de la classe sur une des périodes."; if ($nb_prof_suivi > 1) { echo " La liste des " . $gepi_prof_suivi . " est " . $liste_prof_suivi . "."; } echo "\" />\n"; } echo "<br />\n"; echo "</td>\n"; echo "</tr>\n"; $p++; } else { echo "<tr class='lig{$alt}'>\n"; echo "<td>\n"; echo " "; echo "</td>\n"; echo "<td style='text-align:left;' title=\"Anomalie : Cet utilisateur est associé au groupe, mais n'est pas professeur, ou pas professeur dans cette matière.\">\n"; echo "<b>ANOMALIE</b> :"; //echo " " . $prof_list["users"][$prof_login]["nom"] . " " . $prof_list["users"][$prof_login]["prenom"]; echo " <a href='../utilisateurs/modify_user.php?user_login={$prof_login}' onclick=\"return confirm_abandon (this, change, '{$themessage}')\">" . civ_nom_prenom($prof_login) . "</a>"; if (isset($prof_list["users"][$prof_login]["statut"])) { echo " (<i style='color:red'>compte " . $prof_list["users"][$prof_login]["statut"] . "</i>)"; } echo "<br />\n"; $temoin_nettoyage_requis = 'y'; //echo "Un <a href='../utilitaires/clean_tables.php'>nettoyage des tables</a> s'impose."; echo "</td>\n"; echo "</tr>\n"; } } echo "</table>\n"; if ($temoin_nettoyage_requis != 'n') { echo "Un <a href='../utilitaires/clean_tables.php'>nettoyage des tables</a> s'impose."; } if ($mode == "groupe") { echo "<br />\n\t<input type='checkbox' name='associer_tous_les_profs_de_la_classe' id='associer_tous_les_profs_de_la_classe' value='y' onchange=\"checkbox_change_divers(this.id)\" /><label for='associer_tous_les_profs_de_la_classe' id='texte_associer_tous_les_profs_de_la_classe'> Associer à cet enseignement tous les professeurs de la classe.</label><br />\n\t<input type='checkbox' name='associer_tous_les_profs_de_l_etablissement' id='associer_tous_les_profs_de_l_etablissement' value='y' onchange=\"checkbox_change_divers(this.id)\" /><label for='associer_tous_les_profs_de_l_etablissement' id='texte_associer_tous_les_profs_de_l_etablissement'> Associer à cet enseignement tous les professeurs de l'établissement.</label><br />\n\t"; } else { echo "<br />\n\t<input type='checkbox' name='associer_tous_les_profs_de_la_classe' id='associer_tous_les_profs_de_la_classe' value='y' onchange=\"checkbox_change_divers(this.id)\" /><label for='associer_tous_les_profs_de_la_classe' id='texte_associer_tous_les_profs_de_la_classe'> Associer à cet enseignement tous les professeurs de la (<em>ou des</em>) classe(<em>s</em>).</label><br />\n\t<input type='checkbox' name='associer_tous_les_profs_de_l_etablissement' id='associer_tous_les_profs_de_l_etablissement' value='y' onchange=\"checkbox_change_divers(this.id)\" /><label for='associer_tous_les_profs_de_l_etablissement' id='texte_associer_tous_les_profs_de_l_etablissement'> Associer à cet enseignement tous les professeurs de l'établissement.</label><br />\n\t"; } } }
} } else { $periode = "intervalle"; echo "<input type='hidden' name='display_date_debut' value='{$display_date_debut}' />\n"; echo "<input type='hidden' name='display_date_fin' value='{$display_date_fin}' />\n"; } echo "</p>"; //=========================================================== //=========================================================== //=========================================================== //======================================= // A remplacer par la suite par un choix: //echo "<input type='hidden' name='mode_bulletin' value='html' />\n"; //echo "<input type='hidden' name='un_seul_bull_par_famille' value='non' />\n"; // 20131013 if (getParamClasse($tab_id_classe[0], "rn_type_par_defaut", "html") == "html") { $checked_html = " checked='checked'"; $checked_pdf = ""; } else { $checked_html = ""; $checked_pdf = " checked='checked'"; } echo "<p><input type='radio' id='releve_html' name='mode_bulletin' value='html'{$checked_html} onchange='griser_lignes_specifiques_pdf();' /><label for='releve_html'> Relevé HTML</label><br />\n"; echo "<input type='radio' id='releve_pdf' name='mode_bulletin' value='pdf'{$checked_pdf} onchange='display_div_param_pdf();griser_lignes_specifiques_html();' /><label for='releve_pdf'> Relevé PDF</label></p>\n"; echo "<div id='div_param_pdf'>\n"; //echo "<br />\n"; echo " <input type='checkbox' name='use_cell_ajustee' id='use_cell_ajustee' value='n' "; if (isset($_SESSION['pref_use_cell_ajustee']) && $_SESSION['pref_use_cell_ajustee'] == 'n') { echo "checked='checked' "; } echo "/><label for='use_cell_ajustee' style='cursor: pointer;'> Ne pas utiliser la nouvelle fonction use_cell_ajustee() pour l'écriture des appréciations.</label>";
/** Fonction destinée à retourner la dénomination gepi_prof_suivi adaptée à la classe * * @param integer $id_classe Identifiant de classe * * @return string La dénomination gepi_prof_suivi */ function retourne_denomination_pp($id_classe) { $gepi_prof_suivi = getParamClasse($id_classe, 'gepi_prof_suivi', getSettingValue('gepi_prof_suivi')); if ($gepi_prof_suivi == "") { $gepi_prof_suivi = "professeur principal"; } return $gepi_prof_suivi; }
function renseigner_tab_rn($tab_id_classe) { global $tab_rn_nomdev, $tab_rn_toutcoefdev, $tab_rn_coefdev_si_diff, $tab_rn_col_moy, $tab_rn_datedev, $tab_rn_app, $tab_rn_sign_chefetab, $tab_rn_sign_pp, $tab_rn_sign_resp, $tab_rn_sign_nblig, $tab_rn_formule, $tab_rn_adr_resp, $tab_rn_bloc_obs, $tab_rn_bloc_abs2, $tab_rn_aff_classe_nom, $tab_rn_moy_min_max_classe, $tab_rn_moy_classe, $tab_rn_retour_ligne, $tab_rn_rapport_standard_min_font; $tab_param_table_classes_param=array('rn_aff_classe_nom','rn_app', 'rn_moy_classe', 'rn_moy_min_max_classe', 'rn_retour_ligne','rn_rapport_standard_min_font', 'rn_adr_resp', 'rn_bloc_obs', 'rn_col_moy'); //$tab_item=array(); $tab_item=$tab_param_table_classes_param; $tab_item[]='rn_nomdev'; $tab_item[]='rn_toutcoefdev'; $tab_item[]='rn_coefdev_si_diff'; $tab_item[]='rn_datedev'; // SELON LE STATUT: Accès ou pas if((($_SESSION['statut']!='eleve')&&($_SESSION['statut']!='responsable'))|| (($_SESSION['statut']=='eleve')&&(getSettingAOui('GepiAccesColMoyReleveEleve')))|| (($_SESSION['statut']=='responsable')&&(getSettingAOui('GepiAccesColMoyReleveParent'))) ) { $tab_item[]='rn_col_moy'; } $tab_item[]='rn_sign_chefetab'; $tab_item[]='rn_sign_pp'; $tab_item[]='rn_sign_resp'; if(getSettingValue("active_module_absence")=='2') { $tab_item[]='rn_abs_2'; } $chaine_coef="coef.: "; for($k=0;$k<count($tab_item);$k++) { $champ_courant=$tab_item[$k]; $chaine_tab="tab_".$champ_courant; //echo "<p style='text-indent:-3em;margin-left:3em;'>Récupération de la valeur de ".$tab_item[$k]."<br />"; for($i=0;$i<count($tab_id_classe);$i++) { if(!in_array($tab_item[$k], $tab_param_table_classes_param)) { $sql="SELECT * FROM classes WHERE id='".$tab_id_classe[$i]."';"; //echo "$sql<br />"; $res_class_tmp=mysqli_query($GLOBALS["mysqli"], $sql); if(mysqli_num_rows($res_class_tmp)>0){ $lig_class_tmp=mysqli_fetch_object($res_class_tmp); if($lig_class_tmp->$tab_item[$k]=="y") { ${$chaine_tab}[$i]="y"; //echo "\${".$chaine_tab."}[$i]=".${$chaine_tab}[$i]."<br />"; } /* else { ${$chaine_tab}[$i]="n"; } */ } } elseif(getParamClasse($tab_id_classe[$i],$tab_item[$k],'')=="y") { ${$chaine_tab}[$i]="y"; //echo "\${".$chaine_tab."}[$i]=".${$chaine_tab}[$i]."<br />"; } else { //echo "getParamClasse(".$tab_id_classe[$i].",".$tab_item[$k].",'')=".getParamClasse($tab_id_classe[$i],$tab_item[$k],'')."<br />"; } } } }
// ========================= $rn_abs_2 = old_mysql_result($call_nom_class, 0, 'rn_abs_2'); //========================= // Ajout : Module ECTS $ects_type_formation = old_mysql_result($call_nom_class, 0, 'ects_type_formation'); $ects_parcours = old_mysql_result($call_nom_class, 0, 'ects_parcours'); $ects_code_parcours = old_mysql_result($call_nom_class, 0, 'ects_code_parcours'); $ects_fonction_signataire_attestation = old_mysql_result($call_nom_class, 0, 'ects_fonction_signataire_attestation'); $ects_domaines_etude = old_mysql_result($call_nom_class, 0, 'ects_domaines_etude'); // ========================= // 20121027 // Paramètres enregistrés dans la table 'classes_param': $tab_param = array('rn_aff_classe_nom', 'rn_app', 'rn_moy_classe', 'rn_moy_min_max_classe', 'rn_retour_ligne', 'rn_rapport_standard_min_font', 'rn_adr_resp', 'rn_bloc_obs', 'rn_col_moy', 'rn_type_par_defaut'); for ($loop = 0; $loop < count($tab_param); $loop++) { $tmp_name = $tab_param[$loop]; ${$tmp_name} = getParamClasse($id_classe, $tmp_name, ""); } if ($rn_type_par_defaut == "") { $rn_type_par_defaut = "html"; } if ($rn_aff_classe_nom == "") { $rn_aff_classe_nom = 1; } if ($rn_rapport_standard_min_font == "") { $rn_rapport_standard_min_font = 3; } // ========================= } else { $classe = ''; $nom_complet = ''; $suivi_par = '';
//============================ // Tableau destiné à stocker toutes les infos $tab_bulletin[$id_classe][$periode_num] = array(); if (!isset($intercaler_releve_notes)) { // On initialise un tableau qui va rester vide $tab_releve[$id_classe][$periode_num] = array(); } // 20150203 $tab_bulletin[$id_classe][$tab_periode_num[$loop_periode_num]]['bull_prefixe_periode'] = getParamClasse($id_classe, 'bull_prefixe_periode', "Bulletin du "); if ($tab_bulletin[$id_classe][$tab_periode_num[$loop_periode_num]]['bull_prefixe_periode'] == "") { $tab_bulletin[$id_classe][$tab_periode_num[$loop_periode_num]]['bull_prefixe_periode'] = "Bulletin du "; } elseif (!preg_match("/ \$/", $tab_bulletin[$id_classe][$tab_periode_num[$loop_periode_num]]['bull_prefixe_periode'])) { $tab_bulletin[$id_classe][$tab_periode_num[$loop_periode_num]]['bull_prefixe_periode'] .= " "; } // 20150205 $tab_bulletin[$id_classe][$tab_periode_num[$loop_periode_num]]['gepi_prof_suivi'] = getParamClasse($id_classe, 'gepi_prof_suivi', getSettingValue('gepi_prof_suivi')); if ($tab_bulletin[$id_classe][$tab_periode_num[$loop_periode_num]]['gepi_prof_suivi'] == "") { $tab_bulletin[$id_classe][$tab_periode_num[$loop_periode_num]]['gepi_prof_suivi'] = "professeur principal"; } $tab_bulletin[$id_classe][$periode_num]['affiche_adresse'] = $affiche_adresse; //echo "\$tab_bulletin[$id_classe][$periode_num]['affiche_adresse']=".$tab_bulletin[$id_classe][$periode_num]['affiche_adresse']."<br />"; // Informations sur la période $sql = "SELECT * FROM periodes WHERE id_classe='{$id_classe}' AND num_periode='{$periode_num}';"; $res_per = mysqli_query($GLOBALS["mysqli"], $sql); if (mysqli_num_rows($res_per) > 0) { $lig_per = mysqli_fetch_object($res_per); $tab_bulletin[$id_classe][$periode_num]['num_periode'] = $lig_per->num_periode; //$tab_bulletin[$id_classe][$periode_num]['nom_periode']=$lig_per->nom_periode; $tab_bulletin[$id_classe][$periode_num]['nom_periode'] = preg_replace("/'/", "'", $lig_per->nom_periode); $tab_bulletin[$id_classe][$periode_num]['verouiller'] = $lig_per->verouiller; }