$is_select_multiple = 0; $socle_PA = test_user_droit_specifique($_SESSION['DROIT_SOCLE_POURCENTAGE_ACQUIS']) ? $socle_PA : '<del>Pourcentage d\'items acquis</del>' ; $socle_EV = test_user_droit_specifique($_SESSION['DROIT_SOCLE_ETAT_VALIDATION']) ? $socle_EV : '<del>État de validation</del>' ; } elseif($_SESSION['USER_PROFIL_TYPE']=='eleve') { $tab_groupes = array(0=>array('valeur'=>$_SESSION['ELEVE_CLASSE_ID'],'texte'=>$_SESSION['ELEVE_CLASSE_NOM'],'optgroup'=>'classe')); $of_g = FALSE; $sel_g = TRUE; $class_form_eleve = 'hide'; $class_option_groupe = 'show'; $class_option_mode = 'hide'; $select_eleves = '<select id="f_eleve" name="f_eleve[]"><option value="'.$_SESSION['USER_ID'].'" selected>'.html($_SESSION['USER_NOM'].' '.$_SESSION['USER_PRENOM']).'</option></select>'; $is_select_multiple = 0; $socle_PA = test_user_droit_specifique($_SESSION['DROIT_SOCLE_POURCENTAGE_ACQUIS']) ? $socle_PA : '<del>Pourcentage d\'items acquis</del>' ; $socle_EV = test_user_droit_specifique($_SESSION['DROIT_SOCLE_ETAT_VALIDATION']) ? $socle_EV : '<del>État de validation</del>' ; } $tab_paliers = DB_STRUCTURE_COMMUN::DB_OPT_paliers_etabl(); $tab_matieres = DB_STRUCTURE_COMMUN::DB_OPT_matieres_etabl(); $of_p = (count($tab_paliers)<2) ? FALSE : '' ; $select_palier = HtmlForm::afficher_select($tab_paliers , 'f_palier' /*select_nom*/ , $of_p /*option_first*/ , Form::$tab_choix['palier_id'] /*selection*/ , '' /*optgroup*/); $select_groupe = HtmlForm::afficher_select($tab_groupes , 'f_groupe' /*select_nom*/ , $of_g /*option_first*/ , $sel_g /*selection*/ , 'regroupements' /*optgroup*/); $select_eleves_ordre = HtmlForm::afficher_select(Form::$tab_select_eleves_ordre , 'f_eleves_ordre' /*select_nom*/ , FALSE /*option_first*/ , Form::$tab_choix['eleves_ordre'] /*selection*/ , '' /*optgroup*/); $select_matiere = HtmlForm::afficher_select($tab_matieres , 'f_matiere' /*select_nom*/ , FALSE /*option_first*/ , TRUE /*selection*/ , '' /*optgroup*/ , TRUE /*multiple*/); $select_marge_min = HtmlForm::afficher_select(Form::$tab_select_marge_min , 'f_marge_min' /*select_nom*/ , FALSE /*option_first*/ , Form::$tab_choix['marge_min'] /*selection*/ , '' /*optgroup*/); $select_couleur = HtmlForm::afficher_select(Form::$tab_select_couleur , 'f_couleur' /*select_nom*/ , FALSE /*option_first*/ , Form::$tab_choix['couleur'] /*selection*/ , '' /*optgroup*/); $select_fond = HtmlForm::afficher_select(Form::$tab_select_fond , 'f_fond' /*select_nom*/ , FALSE /*option_first*/ , Form::$tab_choix['fond'] /*selection*/ , '' /*optgroup*/); $select_legende = HtmlForm::afficher_select(Form::$tab_select_legende , 'f_legende' /*select_nom*/ , FALSE /*option_first*/ , Form::$tab_choix['legende'] /*selection*/ , '' /*optgroup*/); // Javascript Layout::add( 'js_inline_before' , 'var is_multiple = '.$is_select_multiple.';' ); ?>
foreach ($tab_options as $val => $txt) { $class = $val == 'NA' ? ' class="check"' : ''; $checked = $val == 'NA' ? ' checked' : ''; $select_critere_seuil_acquis .= '<label for="f_critere_seuil_acquis_' . $val . '"' . $class . '><input type="checkbox" name="f_critere_seuil_acquis[]" id="f_critere_seuil_acquis_' . $val . '" value="' . $val . '"' . $checked . ' /> ' . html($txt) . '</label>'; } $select_critere_seuil_valide = ''; $tab_options = array(0 => 'Invalidé', 1 => 'Validé', 2 => 'Non renseigné'); foreach ($tab_options as $val => $txt) { $class = $val == 0 ? ' class="check"' : ''; $checked = $val == 0 ? ' checked' : ''; $select_critere_seuil_valide .= '<label for="f_critere_seuil_valide_' . $val . '"' . $class . '><input type="checkbox" name="f_critere_seuil_valide[]" id="f_critere_seuil_valide_' . $val . '" value="' . $val . '"' . $checked . ' /> ' . html($txt) . '</label>'; } $tab_groupes = $_SESSION['USER_JOIN_GROUPES'] == 'config' ? DB_STRUCTURE_COMMUN::DB_OPT_groupes_professeur($_SESSION['USER_ID']) : DB_STRUCTURE_COMMUN::DB_OPT_regroupements_etabl(FALSE); $select_groupe = HtmlForm::afficher_select($tab_groupes, 'f_groupe', '', FALSE, 'regroupements'); $select_critere_objet = HtmlForm::afficher_select(Form::$tab_select_recherche_objet, 'f_critere_objet', '', FALSE, 'objet_recherche'); $select_matiere = HtmlForm::afficher_select(DB_STRUCTURE_COMMUN::DB_OPT_matieres_etabl(), 'f_matiere', FALSE, TRUE, '', TRUE); $select_piliers = HtmlForm::afficher_select(DB_STRUCTURE_COMMUN::DB_OPT_paliers_piliers(), 'f_select_pilier', '', FALSE, 'paliers'); $select_selection_items = HtmlForm::afficher_select(DB_STRUCTURE_COMMUN::DB_OPT_selection_items($_SESSION['USER_ID']), 'f_selection_items', '', FALSE, ''); ?> <div><span class="manuel"><a class="pop_up" href="<?php echo SERVEUR_DOCUMENTAIRE; ?> ?fichier=releves_bilans__releve_recherche">DOC : Recherche ciblée.</a></span></div> <hr /> <form action="#" method="post" id="form_select"><fieldset> <p><label class="tab" for="f_groupe">Élèves :</label><?php echo $select_groupe; ?>
* sans même la garantie implicite de COMMERCIALISABILITÉ ni d’ADÉQUATION À UN OBJECTIF PARTICULIER. * Consultez la Licence Publique Générale GNU Affero pour plus de détails. * * Vous devriez avoir reçu une copie de la Licence Publique Générale GNU Affero avec SACoche ; * si ce n’est pas le cas, consultez : <http://www.gnu.org/licenses/>. * */ if(!defined('SACoche')) {exit('Ce fichier ne peut être appelé directement !');} $TITRE = html(Lang::_("Personnels & matières / Personnels coordonnateurs")); ?> <?php // Fabrication des éléments select du formulaire $select_prof = HtmlForm::afficher_select(DB_STRUCTURE_COMMUN::DB_OPT_professeurs_etabl('all') , 'f_prof' /*select_nom*/ , FALSE /*option_first*/ , FALSE /*selection*/ , '' /*optgroup*/ , $multiple=TRUE); $select_matiere = HtmlForm::afficher_select(DB_STRUCTURE_COMMUN::DB_OPT_matieres_etabl() , 'f_matiere' /*select_nom*/ , FALSE /*option_first*/ , FALSE /*selection*/ , '' /*optgroup*/ , $multiple=TRUE); ?> <p><span class="manuel"><a class="pop_up" href="<?php echo SERVEUR_DOCUMENTAIRE ?>?fichier=support_administrateur__gestion_professeurs#toggle_affecter_matieres">DOC : Gestion des professeurs et personnels</a></span></p> <hr /> <form action="#" method="post" id="form_select"> <table><tr> <td class="nu" style="width:25em"> <b>Professeurs :</b><span class="check_multiple"><q class="cocher_tout" title="Tout cocher."></q><q class="cocher_rien" title="Tout décocher."></q></span><br /> <span id="f_prof" class="select_multiple"><?php echo $select_prof ?></span> </td> <td class="nu" style="width:20em"> <b>Matières :</b><span class="check_multiple"><q class="cocher_tout" title="Tout cocher."></q><q class="cocher_rien" title="Tout décocher."></q></span><br /> <span id="f_matiere" class="select_multiple"><?php echo $select_matiere; ?></span>
// //////////////////////////////////////////////////////////////////////////////////////////////////// // Récupération de l'identité des élèves // //////////////////////////////////////////////////////////////////////////////////////////////////// $tab_eleve_infos = DB_STRUCTURE_BILAN::DB_lister_eleves_cibles( $liste_eleve , 'alpha' /*eleves_ordre*/ , FALSE /*with_gepi*/ , FALSE /*with_langue*/ , TRUE /*with_brevet_serie*/ ); if(!is_array($tab_eleve_infos)) { exit('Aucun élève trouvé correspondant aux identifiants transmis !'); } // //////////////////////////////////////////////////////////////////////////////////////////////////// // Récupération des matières utilisées dans l'établissement // //////////////////////////////////////////////////////////////////////////////////////////////////// $DB_TAB = DB_STRUCTURE_COMMUN::DB_OPT_matieres_etabl(); if(is_string($DB_TAB)) { exit($DB_TAB); } foreach($DB_TAB as $DB_ROW) { $tab_matiere[$DB_ROW['valeur']] = $DB_ROW['texte']; } // //////////////////////////////////////////////////////////////////////////////////////////////////// // Récupération de la liste des séries de brevet (probablement une seule) // //////////////////////////////////////////////////////////////////////////////////////////////////// foreach($tab_eleve_infos as $eleve_id => $tab_eleve) {
/** * Retourner, sur une ou plusieurs colonnes, une liste HTML ordonnée des matières, avec des cases à cocher. * * @param void * @return string */ public static function afficher_checkbox_matieres() { $affichage = ''; // Affichage de la liste des matières $DB_TAB = DB_STRUCTURE_COMMUN::DB_OPT_matieres_etabl(); if (is_string($DB_TAB)) { echo $DB_TAB; } else { $nb_matieres = !empty($DB_TAB) ? count($DB_TAB) : 0; $nb_matieres_maxi_par_col = 20; $nb_cols = floor(($nb_matieres - 1) / $nb_matieres_maxi_par_col) + 1; $nb_matieres_par_col = ceil($nb_matieres / $nb_cols); $tab_div = array_fill(0, $nb_cols, ''); foreach ($DB_TAB as $i => $DB_ROW) { $tab_div[floor($i / $nb_matieres_par_col)] .= '<label for="m_' . $DB_ROW['valeur'] . '"><input type="checkbox" name="f_matieres[]" id="m_' . $DB_ROW['valeur'] . '" value="' . $DB_ROW['valeur'] . '" /> ' . html($DB_ROW['texte']) . '</label><br />'; } $affichage .= '<div class="matiere_liste">' . implode('</div>' . NL . '<div class="matiere_liste">', $tab_div) . '</div>' . NL; } return $affichage; }
* * SACoche est distribué dans l’espoir qu’il vous sera utile, mais SANS AUCUNE GARANTIE : * sans même la garantie implicite de COMMERCIALISABILITÉ ni d’ADÉQUATION À UN OBJECTIF PARTICULIER. * Consultez la Licence Publique Générale GNU Affero pour plus de détails. * * Vous devriez avoir reçu une copie de la Licence Publique Générale GNU Affero avec SACoche ; * si ce n’est pas le cas, consultez : <http://www.gnu.org/licenses/>. * */ // Mettre à jour l'élément de formulaire "f_eleve" et le renvoyer en HTML if(!defined('SACoche')) {exit('Ce fichier ne peut être appelé directement !');} if($_SESSION['SESAMATH_ID']==ID_DEMO) {} $action = (isset($_POST['f_action'])) ? Clean::texte($_POST['f_action']) : ''; // ajouter | retirer $matiere = (isset($_POST['f_matiere'])) ? Clean::entier($_POST['f_matiere']) : 0; $multiple = (empty($_POST['f_multiple'])) ? FALSE : TRUE ; // Autres valeurs à récupérer. $select_nom = ($multiple) ? 'f_matieres' : FALSE ; $option_first = ($multiple) ? FALSE : '' ; $selection = ($multiple) ? TRUE : $matiere ; $tab_matieres = ($action=='ajouter') ? DB_STRUCTURE_COMMUN::DB_OPT_matieres_etabl() : DB_STRUCTURE_COMMUN::DB_OPT_matieres_professeur($_SESSION['USER_ID']) ; exit( HtmlForm::afficher_select( $tab_matieres , $select_nom , $option_first , $selection , '' /*optgroup*/ , $multiple ) ); ?>