Пример #1
0
        $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;
$make_action = 'examiner';
$make_html = FALSE;
 $demande_doc = '';
 if ($document_nom) {
     if (!is_file(CHEMIN_DOSSIER_IMPORT . $document_nom)) {
         exit('<label class="erreur">Le document joint est introuvable !</label>');
     }
     $fichier_nom = str_replace('demande_' . $_SESSION['BASE'] . '_', 'demande_', $document_nom);
     if (!FileSystem::deplacer_fichier(CHEMIN_DOSSIER_IMPORT . $document_nom, CHEMIN_DOSSIER_DEVOIR . $_SESSION['BASE'] . DS . $fichier_nom)) {
         exit('<label class="erreur">Impossible de déplacer le document joint !</label>');
     }
     $demande_doc = URL_DIR_DEVOIR . $_SESSION['BASE'] . '/' . $fichier_nom;
 }
 // Enregistrement de la demande
 $score = $score != -1 ? $score : NULL;
 $demande_id = DB_STRUCTURE_DEMANDE::DB_ajouter_demande($_SESSION['USER_ID'], $matiere_id, $item_id, $prof_id, $score, 'eleve', $message, $demande_doc);
 // Ajout aux flux RSS des profs concernés
 $titre = 'Demande ajoutée par ' . afficher_identite_initiale($_SESSION['USER_NOM'], FALSE, $_SESSION['USER_PRENOM'], TRUE);
 $texte = $_SESSION['USER_PRENOM'] . ' ' . $_SESSION['USER_NOM'] . ' ajoute la demande ' . $DB_ROW['item_ref'] . ' "' . $DB_ROW['item_nom'] . '".' . "\r\n";
 $texte .= $demande_doc ? 'Document joint : ' . $demande_doc . "\r\n" : 'Pas de document joint.' . "\r\n";
 $texte .= $message ? 'Commentaire :' . "\r\n" . $message . "\r\n" : 'Pas de commentaire saisi.' . "\r\n";
 $guid = 'demande_' . $demande_id . '_add';
 if ($prof_id) {
     RSS::modifier_fichier_prof($prof_id, $titre, $texte, $guid);
 } else {
     // On récupère les profs...
     $tab_prof_id = array();
     $DB_TAB = DB_STRUCTURE_DEMANDE::DB_recuperer_professeurs_eleve_matiere($_SESSION['USER_ID'], $_SESSION['ELEVE_CLASSE_ID'], $matiere_id);
     if (!empty($DB_TAB)) {
         foreach ($DB_TAB as $DB_ROW) {
             $tab_prof_id[] = $DB_ROW['user_id'];
             RSS::modifier_fichier_prof($DB_ROW['user_id'], $titre, $texte, $guid);
         }
Пример #3
0
 public function Footer()
 {
     if ($this->officiel === NULL) {
         return;
     }
     if ($this->officiel === FALSE) {
         $initiales = afficher_identite_initiale($_SESSION['USER_NOM'], FALSE, $_SESSION['USER_PRENOM'], TRUE, $_SESSION['USER_GENRE']);
         $texte = 'Généré le ' . date("d/m/Y \\à H\\hi\\m\\i\\n") . ' par ' . $initiales . ' (' . $_SESSION['USER_PROFIL_NOM_COURT'] . ') avec SACoche [ ' . SERVEUR_PROJET . ' ] version ' . VERSION_PROG . '.';
         $this->SetXY(0, -$this->distance_pied);
         $this->SetFont('Arial', '', 7);
         $this->choisir_couleur_fond('gris_clair');
         $this->choisir_couleur_trait('gris_moyen');
         $this->Cell($this->page_largeur, 3, To::pdf($texte), 'TB', 0, 'C', $this->fond, SERVEUR_PROJET);
     } elseif ($this->officiel === TRUE) {
         if ($this->filigrane) {
             $this->SetFont('Arial', 'B', 72);
             $this->choisir_couleur_texte('gris_fonce');
             $this->TextWithRotation($this->page_largeur / 6, $this->page_hauteur * 5 / 6, "TEST D'IMPRESSION", tanh($this->page_hauteur / $this->page_largeur) * 180 / M_PI, 0);
         }
         $this->SetFont('Arial', '', 4);
         $this->choisir_couleur_texte('noir');
         $this->SetXY(0, -$this->distance_pied - 1.5);
         $this->Cell($this->page_largeur - $this->marge_droite, 3, To::pdf('Suivi d\'Acquisition de Compétences'), 0, 2, 'R', FALSE, SERVEUR_PROJET);
         $this->SetXY(0, -$this->distance_pied);
         $this->Cell($this->page_largeur - $this->marge_droite, 3, To::pdf(SERVEUR_PROJET), 0, 0, 'R', FALSE, SERVEUR_PROJET);
     }
 }
Пример #4
0
 $info = $devoir_description . ' (' . afficher_identite_initiale($_SESSION['USER_NOM'], FALSE, $_SESSION['USER_PRENOM'], TRUE, $_SESSION['USER_GENRE']) . ')';
 foreach ($tab_nouveau_ajouter as $item_id => $note) {
     DB_STRUCTURE_PROFESSEUR::DB_ajouter_saisie($devoir_proprio_id, $_SESSION['USER_ID'], $devoir_id, $item_id, $devoir_date_mysql, $note, $info, $date_visible_mysql);
 }
 foreach ($tab_nouveau_modifier as $item_id => $note) {
     DB_STRUCTURE_PROFESSEUR::DB_modifier_saisie($devoir_proprio_id, $_SESSION['USER_ID'], $devoir_id, $item_id, $note, $info);
 }
 foreach ($tab_nouveau_supprimer as $item_id) {
     DB_STRUCTURE_PROFESSEUR::DB_supprimer_saisie($_SESSION['USER_ID'], $devoir_id, $item_id);
 }
 foreach ($tab_demande_supprimer as $item_id) {
     DB_STRUCTURE_DEMANDE::DB_supprimer_demande_precise_eleve_item($_SESSION['USER_ID'], $item_id);
 }
 // Ajout aux flux RSS des profs concernés
 $tab_profs_rss = array_merge(array($devoir_proprio_id), DB_STRUCTURE_ELEVE::DB_lister_devoir_profs_droit_saisie($devoir_id));
 $titre = 'Autoévaluation effectuée par ' . afficher_identite_initiale($_SESSION['USER_NOM'], FALSE, $_SESSION['USER_PRENOM'], TRUE);
 $texte = $_SESSION['USER_PRENOM'] . ' ' . $_SESSION['USER_NOM'] . ' s\'auto-évalue sur le devoir "' . $devoir_description . '".' . "\r\n";
 $texte .= $msg_data ? 'Commentaire :' . "\r\n" . $msg_data . "\r\n" : 'Pas de commentaire saisi.' . "\r\n";
 $guid = 'autoeval_' . $devoir_id . '_' . $_SESSION['USER_ID'] . '_' . $_SERVER['REQUEST_TIME'];
 // obligé d'ajouter un time pour unicité au cas où un élève valide 2x l'autoévaluation
 foreach ($tab_profs_rss as $prof_id) {
     RSS::modifier_fichier_prof($prof_id, $titre, $texte, $guid);
 }
 // Notifications (rendues visibles ultérieurement) ; on récupère des données conçues pour le flux RSS ($texte , $tab_profs_rss)
 $abonnement_ref = 'devoir_autoevaluation_eleve';
 $listing_profs = implode(',', $tab_profs_rss);
 if ($listing_profs) {
     $listing_abonnes = DB_STRUCTURE_NOTIFICATION::DB_lister_destinataires_listing_id($abonnement_ref, $listing_profs);
     if ($listing_abonnes) {
         $notification_contenu = $texte;
         $tab_abonnes = explode(',', $listing_abonnes);
Пример #5
0
$select_pages_nb          = HtmlForm::afficher_select(Form::$tab_select_pages_nb          , 'f_pages_nb'          /*select_nom*/ ,                   FALSE /*option_first*/ , Form::$tab_choix['pages_nb']                 /*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*/);
$select_cases_nb          = HtmlForm::afficher_select(Form::$tab_select_cases_nb          , 'f_cases_nb'          /*select_nom*/ ,                   FALSE /*option_first*/ , Form::$tab_choix['cases_nb']                 /*selection*/ ,              '' /*optgroup*/);
$select_cases_larg        = HtmlForm::afficher_select(Form::$tab_select_cases_size        , 'f_cases_larg'        /*select_nom*/ ,                   FALSE /*option_first*/ , Form::$tab_choix['cases_largeur']            /*selection*/ ,              '' /*optgroup*/);

$select_selection_items = HtmlForm::afficher_select(DB_STRUCTURE_COMMUN::DB_OPT_selection_items($_SESSION['USER_ID']) , 'f_selection_items' , '' /*option_first*/ , FALSE /*selection*/ , '' /*optgroup*/);

// Javascript
Layout::add( 'js_inline_before' , 'var date_mysql  = "'.TODAY_MYSQL.'";' );
Layout::add( 'js_inline_before' , 'var is_multiple = '.$is_select_multiple.';' );
Layout::add( 'js_inline_before' , 'var auto_voir_releve     = '.$auto_voir_releve.';' );
Layout::add( 'js_inline_before' , 'var auto_select_eleve_id = '.$auto_select_eleve_id.';' );
Layout::add( 'js_inline_before' , 'var user_id     = '.$_SESSION['USER_ID'].';' );
Layout::add( 'js_inline_before' , 'var user_texte  = "'.html(afficher_identite_initiale($_SESSION['USER_NOM'],FALSE,$_SESSION['USER_PRENOM'],TRUE,$_SESSION['USER_GENRE'])).'";' );
Layout::add( 'js_inline_before' , 'var user_profil = "'.$_SESSION['USER_PROFIL_TYPE'].'";' );
// Fabrication du tableau javascript "tab_groupe_periode" pour les jointures groupes/périodes
HtmlForm::fabriquer_tab_js_jointure_groupe( $tab_groupes , TRUE /*tab_groupe_periode*/ , FALSE /*tab_groupe_niveau*/ );

?>

<div><span class="manuel"><a class="pop_up" href="<?php echo SERVEUR_DOCUMENTAIRE ?>?fichier=releves_bilans__releve_items">DOC : Relevé d'items.</a></span></div>

<hr />

<form action="#" method="post" id="form_select"><fieldset>

  <div>
    <label class="tab" for="f_objet">Objet :</label><?php echo str_replace( '"selection"' , '"selection"'.$objet_selection , $select_objet_releve); ?>
  </div>
Пример #6
0
/**
 * Retourner un tableau [valeur texte] des profs ayant évalué les élèves d'une classe ou d'un groupe
 *
 * On cherche les évals des profs sur les élèves du regroupement.
 * On récupère donc aussi les profs qui ne sont pas forcément rattachés au regroupement.
 * Ce qui est utile pour un élève d'une classe si un prof n'est rattaché qu'à un groupe, et inversement.
 *
 * @param string $groupe_type   valeur parmi 'classe' ou 'groupe'
 * @param int    $groupe_id     id de la classe ou du groupe
 * @return array
 */
public static function DB_OPT_profs_groupe($groupe_type,$groupe_id)
{
  $DB_SQL = 'SELECT prof.user_id AS valeur, prof.user_genre AS prof_genre, prof.user_nom AS prof_nom, prof.user_prenom AS prof_prenom ';
  switch ($groupe_type)
  {
    case 'classe' :  // On veut tous les élèves d'une classe (on utilise "eleve_classe_id" de "sacoche_user")
      $DB_SQL.= 'FROM sacoche_user AS eleve ';
      $WHERE  = 'WHERE eleve.eleve_classe_id=:classe ';
      $DB_VAR = array(':classe'=>$groupe_id);
      break;
    case 'groupe' :  // On veut tous les élèves d'un groupe (on utilise la jointure de "sacoche_jointure_user_groupe")
      $DB_SQL.= 'FROM sacoche_jointure_user_groupe ';
      $DB_SQL.= 'LEFT JOIN sacoche_user AS eleve USING (user_id) ';
      $WHERE  = 'WHERE sacoche_jointure_user_groupe.groupe_id=:groupe ';
      $DB_VAR = array(':groupe'=>$groupe_id);
      break;
  }
  $DB_SQL.= 'LEFT JOIN sacoche_saisie ON eleve.user_id=sacoche_saisie.eleve_id ';
  $DB_SQL.= 'LEFT JOIN sacoche_devoir USING (devoir_id) ';
  $DB_SQL.= 'LEFT JOIN sacoche_user AS prof ON sacoche_devoir.proprio_id=prof.user_id ';
  $DB_SQL.= $WHERE.'AND eleve.user_sortie_date>NOW() AND prof.user_id IS NOT NULL ';
  $DB_SQL.= 'GROUP BY prof.user_id ';
  $DB_SQL.= 'ORDER BY prof_nom ASC, prof_prenom ASC ';
  $DB_TAB = DB::queryTab(SACOCHE_STRUCTURE_BD_NAME , $DB_SQL , $DB_VAR);
  if(!empty($DB_TAB))
  {
    foreach($DB_TAB as $key => $DB_ROW)
    {
      $texte = afficher_identite_initiale( $DB_ROW['prof_nom'] , FALSE , $DB_ROW['prof_prenom'] , TRUE , $DB_ROW['prof_genre'] );
      unset( $DB_TAB[$key]['prof_nom'], $DB_TAB[$key]['prof_prenom'], $DB_TAB[$key]['prof_genre'] );
      $DB_TAB[$key]['texte'] = $texte;
    }
  }
  return $DB_TAB;
}
Пример #7
0
function enregistrer_note($BILAN_TYPE, $periode_id, $eleve_id, $rubrique_id, $moyenne)
{
    $note = $_SESSION['OFFICIEL']['BULLETIN_CONVERSION_SUR_20'] ? round($moyenne, 1) : round($moyenne / 5, 1);
    $appreciation = 'Moyenne figée reportée par ' . afficher_identite_initiale($_SESSION['USER_NOM'], FALSE, $_SESSION['USER_PRENOM'], TRUE, $_SESSION['USER_GENRE']);
    DB_STRUCTURE_OFFICIEL::DB_modifier_bilan_officiel_saisie($BILAN_TYPE, $periode_id, $eleve_id, $rubrique_id, 0, 'eleve', $note, $appreciation);
    return array($note, $appreciation);
}
 {
   $adresse_lien_profond = Sesamail::adresse_lien_profond('page=evaluation_voir&devoir_id=');
   $tab_item_for_user = array();
   foreach($tab_user_item as $key)
   {
     list($eleve_id,$item_id) = explode('x',$key);
     $tab_item_for_user[$eleve_id][] = $item_id;
   }
   if(!$devoir_saisie)
   {
     $notification_contenu = 'retirée par '.afficher_identite_initiale($_SESSION['USER_NOM'],FALSE,$_SESSION['USER_PRENOM'],TRUE,$_SESSION['USER_GENRE']).'.'."\r\n\r\n";
     $notification_contenu.= ($message) ? 'Commentaire :'."\r\n".$message."\r\n\r\n" : 'Pas de commentaire saisi.'."\r\n\r\n" ;
   }
   else
   {
     $notification_contenu = 'évaluée directement par '.afficher_identite_initiale($_SESSION['USER_NOM'],FALSE,$_SESSION['USER_PRENOM'],TRUE,$_SESSION['USER_GENRE']).'.'."\r\n\r\n";
     $notification_contenu.= 'Y accéder :'."\r\n".$adresse_lien_profond.$devoir_saisie;
   }
   $tab_item_infos = array();
   $tab_abonnes = explode(',',$listing_abonnes);
   foreach($tab_abonnes as $abonne_id)
   {
     foreach($tab_item_for_user[$abonne_id] as $item_id)
     {
       if(!isset($tab_item_infos[$item_id]))
       {
         // Récupérer la référence et le nom de l'item
         $DB_ROW = DB_STRUCTURE_DEMANDE::DB_recuperer_item_infos($item_id);
         $tab_item_infos[$item_id] = $DB_ROW['item_ref'].' "'.$DB_ROW['item_nom'].'"';
       }
       $notification_intro = 'Demande '.$tab_item_infos[$item_id].' ';
            $notif_eleve = TRUE;
        } elseif ($presence_saisie != $note_val) {
            DB_STRUCTURE_PROFESSEUR::DB_modifier_saisie($_SESSION['USER_ID'], $eleve_id, $devoir_id, $item_id, $note_val, $info);
            $notif_eleve = TRUE;
        }
    }
    // Notifications (rendues visibles ultérieurement) ; le mode discret ne d'applique volontairement pas ici car les modifications sont chirurgicales
    if ($notif_eleve) {
        $abonnement_ref = 'devoir_saisie';
        $listing_eleves = (string) $eleve_id;
        $listing_parents = DB_STRUCTURE_NOTIFICATION::DB_lister_parents_listing_id($listing_eleves);
        $listing_users = $listing_parents ? $listing_eleves . ',' . $listing_parents : $listing_eleves;
        $listing_abonnes = DB_STRUCTURE_NOTIFICATION::DB_lister_destinataires_listing_id($abonnement_ref, $listing_users);
        if ($listing_abonnes) {
            $adresse_lien_profond = Sesamail::adresse_lien_profond('page=evaluation_voir&devoir_id=' . $devoir_id . '&eleve_id=');
            $notification_contenu = 'Saisie "à la volée" enregistrée par ' . afficher_identite_initiale($_SESSION['USER_NOM'], FALSE, $_SESSION['USER_PRENOM'], TRUE, $_SESSION['USER_GENRE']) . '.' . "\r\n\r\n";
            $tab_abonnes = DB_STRUCTURE_NOTIFICATION::DB_lister_detail_abonnes_envois($listing_abonnes, $listing_eleves, $listing_parents);
            foreach ($tab_abonnes as $abonne_id => $tab_abonne) {
                foreach ($tab_abonne as $eleve_id => $notification_intro_eleve) {
                    $notification_lien = 'Voir le détail :' . "\r\n" . $adresse_lien_profond . $eleve_id;
                    DB_STRUCTURE_NOTIFICATION::DB_modifier_log_attente($abonne_id, $abonnement_ref, $devoir_id, NULL, $notification_intro_eleve . $notification_contenu . $notification_lien, 'remplacer');
                }
            }
        }
    }
    // Afficher le retour
    exit_json(TRUE, array('devoir_id' => $devoir_id, 'groupe_id' => $groupe_id));
}
// ////////////////////////////////////////////////////////////////////////////////////////////////////
// On ne devrait pas en arriver là...
// ////////////////////////////////////////////////////////////////////////////////////////////////////
{
  if($version_base_structure_actuelle==DB_STRUCTURE_MAJ_BASE::DB_version_base())
  {
    $version_base_structure_actuelle = '2011-10-01';
    DB::query(SACOCHE_STRUCTURE_BD_NAME , 'UPDATE sacoche_parametre SET parametre_valeur="'.$version_base_structure_actuelle.'" WHERE parametre_nom="version_base"' );
    // Le nom de l'évaluation n'était plus associé aux notes mémorisées...
    $DB_SQL = 'SELECT sacoche_saisie.prof_id,eleve_id,devoir_id,item_id,devoir_info,user_nom,user_prenom ';
    $DB_SQL.= 'FROM sacoche_saisie ';
    $DB_SQL.= 'INNER JOIN sacoche_devoir USING (devoir_id) ';
    $DB_SQL.= 'INNER JOIN sacoche_user ON sacoche_saisie.prof_id = sacoche_user.user_id ';
    $DB_SQL.= 'WHERE saisie_info LIKE " (%"';
    $DB_TAB = DB::queryTab(SACOCHE_STRUCTURE_BD_NAME , $DB_SQL );
    $DB_SQL = 'UPDATE sacoche_saisie SET saisie_info=:saisie_info WHERE prof_id=:prof_id AND eleve_id=:eleve_id AND devoir_id=:devoir_id AND item_id=:item_id';
    foreach($DB_TAB as $DB_ROW)
    {
      $saisie_info = $DB_ROW['devoir_info'].' ('.afficher_identite_initiale($DB_ROW['user_nom'],FALSE,$DB_ROW['user_prenom'],TRUE).')';
      $DB_VAR = array(
        ':prof_id'     => $DB_ROW['prof_id'],
        ':eleve_id'    => $DB_ROW['eleve_id'],
        ':devoir_id'   => $DB_ROW['devoir_id'],
        ':item_id'     => $DB_ROW['item_id'],
        ':saisie_info' => $saisie_info,
      );
      DB::query(SACOCHE_STRUCTURE_BD_NAME , $DB_SQL , $DB_VAR);
    }
  }
}

// ////////////////////////////////////////////////////////////////////////////////////////////////////
// MAJ 2011-10-01 => 2011-10-09
// ////////////////////////////////////////////////////////////////////////////////////////////////////
Пример #11
0
 /**
  * Ajouter une demande d'évaluation
  *
  * @param int      $eleve_id
  * @param int      $matiere_id
  * @param int      $item_id
  * @param int      $prof_id
  * @param int|null $demande_score
  * @param string   $demande_statut
  * @param string   $message
  * @param string   $demande_doc
  * @return int
  */
 public static function DB_ajouter_demande($eleve_id, $matiere_id, $item_id, $prof_id, $demande_score, $demande_statut, $message, $demande_doc)
 {
     $demande_messages = $message ? afficher_identite_initiale($_SESSION['USER_NOM'], FALSE, $_SESSION['USER_PRENOM'], TRUE) . "\r\n" . $message : '';
     $DB_SQL = 'INSERT INTO sacoche_demande( eleve_id, matiere_id, item_id, prof_id,demande_date, demande_score, demande_statut, demande_messages, demande_doc) ';
     $DB_SQL .= 'VALUES                     (:eleve_id,:matiere_id,:item_id,:prof_id,       NOW(),:demande_score,:demande_statut,:demande_messages,:demande_doc)';
     $DB_VAR = array(':eleve_id' => $eleve_id, ':matiere_id' => $matiere_id, ':item_id' => $item_id, ':prof_id' => $prof_id, ':demande_score' => $demande_score, ':demande_statut' => $demande_statut, ':demande_messages' => $demande_messages, ':demande_doc' => $demande_doc);
     DB::query(SACOCHE_STRUCTURE_BD_NAME, $DB_SQL, $DB_VAR);
     return DB::getLastOid(SACOCHE_STRUCTURE_BD_NAME);
 }
Пример #12
0
if ($action == 'signaler_faute' || $action == 'corriger_faute') {
    $destinataire_id = isset($_POST['f_destinataire_id']) ? Clean::entier($_POST['f_destinataire_id']) : 0;
    $message_contenu = isset($_POST['f_message_contenu']) ? Clean::texte($_POST['f_message_contenu']) : '';
    if (!$destinataire_id || !$message_contenu) {
        exit('Erreur avec les données transmises !');
    }
    // Notification (qui est envoyée de suite)
    $abonnement_ref = 'bilan_officiel_appreciation';
    $DB_TAB = DB_STRUCTURE_NOTIFICATION::DB_lister_destinataires_avec_informations($abonnement_ref, $destinataire_id);
    $destinataires_nb = count($DB_TAB);
    if (!$destinataires_nb) {
        // Normalement impossible, l'abonnement des personnels à ce type de de notification étant obligatoire
        exit('Erreur : destinataire non trouvé !');
    }
    $notification_debut = $action == 'signaler_faute' ? 'Signalement effectué par ' : 'Correction apportée par ';
    $notification_contenu = $notification_debut . afficher_identite_initiale($_SESSION['USER_NOM'], FALSE, $_SESSION['USER_PRENOM'], TRUE, $_SESSION['USER_GENRE']) . ' :' . "\r\n\r\n" . $message_contenu . "\r\n";
    foreach ($DB_TAB as $DB_ROW) {
        // 1 seul passage en fait
        $notification_statut = COURRIEL_NOTIFICATION == 'oui' && $DB_ROW['jointure_mode'] == 'courriel' && $DB_ROW['user_email'] ? 'envoyée' : 'consultable';
        DB_STRUCTURE_NOTIFICATION::DB_ajouter_log_visible($DB_ROW['user_id'], $abonnement_ref, $notification_statut, $notification_contenu);
        if ($notification_statut == 'envoyée') {
            $destinataire = $DB_ROW['user_prenom'] . ' ' . $DB_ROW['user_nom'] . ' <' . $DB_ROW['user_email'] . '>';
            $notification_contenu .= Sesamail::texte_pied_courriel(array('no_reply', 'notif_individuelle', 'signature'), $DB_ROW['user_email']);
            $courriel_bilan = Sesamail::mail($destinataire, 'Notification - Erreur appréciation bilan officiel', $notification_contenu, $destinataire);
        }
    }
    exit('ok');
}
// ////////////////////////////////////////////////////////////////////////////////////////////////////
// Générer un archivage des saisies
// ////////////////////////////////////////////////////////////////////////////////////////////////////
Пример #13
0
 if($nb_destinataires_valides>100)
 {
   exit('Trop de sélections : choisir "Tous (automatique)" sur des regroupements !');
 }
 DB_STRUCTURE_MESSAGE::DB_modifier_message( $message_id , $_SESSION['USER_ID'] , $date_debut_mysql , $date_fin_mysql , $message_contenu );
 DB_STRUCTURE_MESSAGE::DB_modifier_message_destinataires( $message_id , $tab_destinataires_valides , 'substituer' );
 // Notifications (rendues visibles ultérieurement)
 if(!$mode_discret)
 {
   $tab_user_id = DB_STRUCTURE_MESSAGE::DB_recuperer_user_id_from_destinataires( $tab_destinataires_valides );
   DB_STRUCTURE_NOTIFICATION::DB_supprimer_log_attente( $abonnement_ref , $message_id );
   $listing_abonnes = DB_STRUCTURE_NOTIFICATION::DB_lister_destinataires_listing_id( $abonnement_ref , implode(',',$tab_user_id) );
   if($listing_abonnes)
   {
     $notification_date = ( TODAY_MYSQL < $date_debut_mysql ) ? $date_debut_mysql : NULL ;
     $notification_contenu = 'Message de '.afficher_identite_initiale($_SESSION['USER_NOM'],FALSE,$_SESSION['USER_PRENOM'],TRUE,$_SESSION['USER_GENRE']).' :'."\r\n\r\n".make_lien($message_contenu,'mail')."\r\n";
     $tab_abonnes = explode(',',$listing_abonnes);
     foreach($tab_abonnes as $abonne_id)
     {
       DB_STRUCTURE_NOTIFICATION::DB_ajouter_log_attente( $abonne_id , $abonnement_ref , $message_id , $notification_date , $notification_contenu );
     }
   }
 }
 // Afficher le retour
 $destinataires_nombre = ($nb_destinataires_valides>1) ? $nb_destinataires_valides.' sélections' : $nb_destinataires_valides.' sélection' ;
 echo'<td>'.$date_debut_fr.'</td>';
 echo'<td>'.$date_fin_fr.'</td>';
 echo'<td>'.$destinataires_nombre.'</td>';
 echo'<td>'.html(afficher_texte_tronque($message_contenu,60)).'</td>';
 echo'<td class="nu">';
 echo  '<q class="modifier" title="Modifier ce message."></q>';
Пример #14
0
      <th>Destinaire(s)</th>
      <th>Item</th>
      <th>Score</th>
      <th>Statut</th>
      <th>Messages</th>
      <th>Fichier</th>
      <th class="nu"></th>
    </tr>
  </thead>
  <tbody>
    <?php 
// Lister les demandes d'évaluation
$DB_TAB = DB_STRUCTURE_DEMANDE::DB_lister_demandes_eleve($_SESSION['USER_ID']);
if (!empty($DB_TAB)) {
    foreach ($DB_TAB as $DB_ROW) {
        $destinataires = $DB_ROW['prof_id'] ? html(afficher_identite_initiale($DB_ROW['user_nom'], FALSE, $DB_ROW['user_prenom'], TRUE, $DB_ROW['user_genre'])) : 'enseignants concernés';
        $score = $DB_ROW['demande_score'] !== null ? $DB_ROW['demande_score'] : FALSE;
        $statut = $DB_ROW['demande_statut'] == 'eleve' ? 'demande non traitée' : 'évaluation en préparation';
        $texte_lien_avant = $DB_ROW['item_lien'] ? '<a target="_blank" href="' . html($DB_ROW['item_lien']) . '">' : '';
        $texte_lien_apres = $DB_ROW['item_lien'] ? '</a>' : '';
        $commentaire = $DB_ROW['demande_messages'] ? 'oui <img alt="" src="./_img/bulle_aide.png" width="16" height="16" title="' . str_replace(array("\r\n", "\r", "\n"), '<br />', html(html($DB_ROW['demande_messages']))) . '" />' : 'non';
        // Volontairement 2 html() pour le title sinon &lt;* est pris comme une balise html par l'infobulle.
        $document = $DB_ROW['demande_doc'] ? '<a href="' . html($DB_ROW['demande_doc']) . '" target="_blank">oui</a>' : 'non';
        // Afficher une ligne du tableau
        echo '<tr id="ids_' . $DB_ROW['demande_id'] . '_' . $DB_ROW['item_id'] . '_' . $DB_ROW['matiere_id'] . '_' . $DB_ROW['prof_id'] . '">';
        echo '<td>' . convert_date_mysql_to_french($DB_ROW['demande_date']) . '</td>';
        echo '<td>' . html($DB_ROW['matiere_nom']) . '</td>';
        echo '<td>' . $destinataires . '</td>';
        echo '<td>' . $texte_lien_avant . html($DB_ROW['item_ref']) . $texte_lien_apres . ' <img alt="" src="./_img/bulle_aide.png" width="16" height="16" title="' . html(html($DB_ROW['item_nom'])) . '" /></td>';
        // Volontairement 2 html() pour le title sinon &lt;* est pris comme une balise html par l'infobulle.
        echo str_replace('</td>', ' <q class="actualiser" title="Actualiser le score (enregistré lors de la demande)."></q></td>', Html::td_score($score, 'score', ''));
Пример #15
0
{
  $DB_TAB = DB_STRUCTURE_OFFICIEL::DB_lister_profs_principaux($classe_id);
  if(empty($DB_TAB))
  {
    $texte_prof_principal = 'Professeur principal : sans objet.';
  }
  else if(count($DB_TAB)==1)
  {
    $texte_prof_principal = 'Professeur principal : '.afficher_identite_initiale($DB_TAB[0]['user_nom'],FALSE,$DB_TAB[0]['user_prenom'],TRUE,$DB_TAB[0]['user_genre']);
  }
  else
  {
    $tab_pp = array();
    foreach($DB_TAB as $DB_ROW)
    {
      $tab_pp[] = afficher_identite_initiale($DB_ROW['user_nom'],FALSE,$DB_ROW['user_prenom'],TRUE,$DB_ROW['user_genre']);
    }
    $texte_prof_principal = 'Professeurs principaux : '.implode(' ; ',$tab_pp);
  }
}

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

$make_officiel = TRUE;
$make_brevet   = FALSE;
$make_action   = 'consulter';
$make_html     = ( ($BILAN_TYPE=='bulletin') && ($mode=='graphique') ) ? FALSE : TRUE ;
$make_pdf      = FALSE;
Пример #16
0
        }
    }
}
// ////////////////////////////////////////////////////////////////////////////////////////////////////
// [saisies] - Notes à saisir (prof) ou auto-évaluations en cours (élèves)
// ////////////////////////////////////////////////////////////////////////////////////////////////////
// PARTIE PROF A DEVELOPPER - PARTIE PROF A DEVELOPPER - PARTIE PROF A DEVELOPPER - PARTIE PROF A DEVELOPPER - PARTIE PROF A DEVELOPPER
if ($_SESSION['USER_PROFIL_TYPE'] == 'eleve') {
    $DB_TAB = DB_STRUCTURE_ELEVE::DB_lister_devoirs_eleve_avec_autoevaluation_en_cours($_SESSION['USER_ID'], $_SESSION['ELEVE_CLASSE_ID']);
    if (!empty($DB_TAB)) {
        $tab_accueil['saisies']['nombre'] = count($DB_TAB);
        $tab_accueil['saisies']['contenu'] = '<div class="b"><TG> ' . $tab_accueil['saisies']['masque'] . '</div>';
        $tab_accueil['saisies']['contenu'] .= '<ul class="puce p">';
        foreach ($DB_TAB as $DB_ROW) {
            $date_affich = convert_date_mysql_to_french($DB_ROW['devoir_date']);
            $tab_accueil['saisies']['contenu'] .= '<li>' . html($date_affich) . ' || <a href="./index.php?page=evaluation_voir&amp;devoir_id=' . $DB_ROW['devoir_id'] . '&amp;autoeval">' . html(afficher_identite_initiale($DB_ROW['prof_nom'], FALSE, $DB_ROW['prof_prenom'], TRUE, $DB_ROW['prof_genre'])) . ' || ' . html($DB_ROW['devoir_info']) . '</a></li>';
        }
        $tab_accueil['saisies']['contenu'] .= '</ul>';
    }
}
// ////////////////////////////////////////////////////////////////////////////////////////////////////
// [officiel] - Bilans officiels ouverts à la saisie (prof) ou à consulter (élèves / parents)
// ////////////////////////////////////////////////////////////////////////////////////////////////////
// PARTIE PROF A DEVELOPPER - PARTIE PROF A DEVELOPPER - PARTIE PROF A DEVELOPPER - PARTIE PROF A DEVELOPPER - PARTIE PROF A DEVELOPPER
if ($_SESSION['USER_PROFIL_TYPE'] == 'eleve' || $_SESSION['USER_PROFIL_TYPE'] == 'parent' && $_SESSION['NB_ENFANTS'] > 0) {
    // Cette section reprend pas mal de code issu de la page [officiel_voir_archive.php]
    $tab_types = array('brevet' => array('droit' => 'FICHE_BREVET', 'titre' => 'Fiche brevet'), 'releve' => array('droit' => 'OFFICIEL_RELEVE', 'titre' => 'Relevé d\'évaluations'), 'bulletin' => array('droit' => 'OFFICIEL_BULLETIN', 'titre' => 'Bulletin scolaire'), 'palier1' => array('droit' => 'OFFICIEL_SOCLE', 'titre' => 'Maîtrise du palier 1'), 'palier2' => array('droit' => 'OFFICIEL_SOCLE', 'titre' => 'Maîtrise du palier 2'), 'palier3' => array('droit' => 'OFFICIEL_SOCLE', 'titre' => 'Maîtrise du palier 3'));
    $droit_voir_archives_pdf = FALSE;
    foreach ($tab_types as $BILAN_TYPE => $tab) {
        $droit_voir_archives_pdf = $droit_voir_archives_pdf || test_user_droit_specifique($_SESSION['DROIT_' . $tab['droit'] . '_VOIR_ARCHIVE']);
        if ($BILAN_TYPE == 'palier1') {
Пример #17
0
{
  $annee_affichee = $annee_actuelle;
}
else if($mois_actuel < $mois_bascule)
{
  $annee_affichee = ($annee_actuelle-1).'/'.$annee_actuelle;
}
else
{
  $annee_affichee = $annee_actuelle.'/'.($annee_actuelle+1);
}
$tab_bloc_titres = array( 0 => $tab_types[$BILAN_TYPE]['titre'] , 1 => 'Année scolaire '.$annee_affichee.' - '.$periode_nom , 2 =>$classe_nom );

// Tag date heure initiales

$tag_date_heure_initiales = date('d/m/Y H:i').' '.afficher_identite_initiale($_SESSION['USER_PRENOM'],TRUE,$_SESSION['USER_NOM'],TRUE);

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

$tab_pages_decoupe_pdf = array();
$make_officiel = TRUE;
$make_brevet   = FALSE;
$make_action   = 'imprimer';
$make_html     = FALSE;
$make_pdf      = TRUE;
$make_csv      = FALSE;
$make_graph    = FALSE;
}
// ////////////////////////////////////////////////////////////////////////////////////////////////////
// Forcer des reports de notes par un prof
// ////////////////////////////////////////////////////////////////////////////////////////////////////
$tab_periode_eleves = isset($_POST['f_periode_eleves']) ? explode('_', $_POST['f_periode_eleves']) : '';
$tab_eleves_moyennes = isset($_POST['f_eleves_moyennes']) ? explode('x', $_POST['f_eleves_moyennes']) : '';
$rubrique_id = isset($_POST['f_rubrique']) ? Clean::entier($_POST['f_rubrique']) : 0;
$periode_id = count($tab_periode_eleves) ? $tab_periode_eleves[0] : 0;
// On vérifie les paramètres principaux
if (!$periode_id || !$rubrique_id || count($tab_periode_eleves) < 2 || !count($tab_eleves_moyennes) || $_SESSION['USER_PROFIL_TYPE'] != 'professeur' || !$_SESSION['OFFICIEL']['BULLETIN_MOYENNE_SCORES']) {
    exit('Erreur avec les données transmises !');
}
// On passe en revue les données
unset($tab_periode_eleves[0]);
$tab_eleve_id = array_filter(Clean::map_entier($tab_periode_eleves), 'positif');
$appreciation = 'Moyenne figée reportée par ' . afficher_identite_initiale($_SESSION['USER_NOM'], FALSE, $_SESSION['USER_PRENOM'], TRUE, $_SESSION['USER_GENRE']);
$nb_reports = 0;
foreach ($tab_eleves_moyennes as $eleve_moyenne) {
    list($eleve_id, $moyenne) = explode('_', $eleve_moyenne);
    $eleve_id = (int) $eleve_id;
    $note = round($moyenne, 1);
    // $tab_eleve_id contient la liste des élèves dont il faut changer les notes ; ce peut n'être qu'une intersection groupe x classe
    // $tab_eleves_moyennes contient les moyennes de tous les élèves du groupe ou de la classe
    if (in_array($eleve_id, $tab_eleve_id)) {
        DB_STRUCTURE_OFFICIEL::DB_modifier_bilan_officiel_saisie('bulletin', $periode_id, $eleve_id, $rubrique_id, 0, 'eleve', $note, $appreciation);
        $nb_reports++;
    }
}
// On affiche le résultat
if (!$nb_reports) {
    exit('Erreur avec les données transmises !');
Пример #19
0
                 $tab_profs_par_classe[$classe_id] = $tab_profils['directeur'];
             }
         }
         if (!empty($tab_profils['professeur'])) {
             // Les professeurs ne sont rattachés qu'à certaines classes
             $listing_profs_id = implode(',', $tab_profils['professeur']);
             $listing_groupes_id = implode(',', array_keys($tab_classes));
             $DB_TAB = DB_STRUCTURE_ADMINISTRATEUR::DB_lister_jointure_professeurs_groupes($listing_profs_id, $listing_groupes_id);
             foreach ($DB_TAB as $DB_ROW) {
                 $tab_profs_par_classe[$DB_ROW['groupe_id']][] = $DB_ROW['user_id'];
             }
         }
     }
 }
 // On passe au traitement des données reçues
 $auteur = afficher_identite_initiale($_SESSION['USER_NOM'], FALSE, $_SESSION['USER_PRENOM'], TRUE, $_SESSION['USER_GENRE']);
 foreach ($tab_ids as $classe_id) {
     $is_modif = DB_STRUCTURE_BREVET::DB_modifier_brevet_classe_etat($classe_id, $new_etat);
     if ($is_modif && $abonnes_nb && isset($tab_profs_par_classe[$classe_id])) {
         $texte = 'Statut [' . $tab_etats[$new_etat] . '] appliqué par ' . $auteur . ' à [Fiches brevet] [Session ' . $annee_session_brevet . '] [' . $tab_classes[$classe_id] . '].' . "\r\n";
         foreach ($tab_profs_par_classe[$classe_id] as $user_id) {
             $tab_abonnes[$user_id]['contenu'] .= $texte;
         }
     }
 }
 // On termine par le log et l'envoi des notifications
 if ($abonnes_nb) {
     foreach ($tab_abonnes as $user_id => $tab) {
         if ($tab['contenu']) {
             DB_STRUCTURE_NOTIFICATION::DB_ajouter_log_visible($user_id, $abonnement_ref, $tab['statut'], $tab['contenu']);
             if ($tab['statut'] == 'envoyée') {
Пример #20
0
   }
   else
   {
     DB_STRUCTURE_COMMENTAIRE::DB_supprimer_devoir_commentaire( $devoir_id , $eleve_id );
     $presence = FALSE;
   }
 }
 // Notifications (rendues visibles ultérieurement) ; le mode discret ne d'applique volontairement pas ici car les modifications sont chirurgicales
 $listing_eleves = (string)$eleve_id;
 $listing_parents = DB_STRUCTURE_NOTIFICATION::DB_lister_parents_listing_id($listing_eleves);
 $listing_users = ($listing_parents) ? $listing_eleves.','.$listing_parents : $listing_eleves ;
 $listing_abonnes = DB_STRUCTURE_NOTIFICATION::DB_lister_destinataires_listing_id( $abonnement_ref_saisie , $listing_users );
 if($listing_abonnes)
 {
   $notification_date = ( TODAY_MYSQL < $date_visible_mysql ) ? $date_visible_mysql : NULL ;
   $notification_contenu = 'Saisies pour l\'évaluation "'.$description.'" du '.$date_fr.' enregistrées par '.afficher_identite_initiale($_SESSION['USER_NOM'],FALSE,$_SESSION['USER_PRENOM'],TRUE,$_SESSION['USER_GENRE']).'.'."\r\n\r\n";
   $notification_lien = 'Voir le détail :'."\r\n".Sesamail::adresse_lien_profond('page=evaluation_voir&devoir_id='.$devoir_id.'&eleve_id='.$eleve_id);
   $tab_abonnes = DB_STRUCTURE_NOTIFICATION::DB_lister_detail_abonnes_envois( $listing_abonnes , $listing_eleves , $listing_parents );
   foreach($tab_abonnes as $abonne_id => $tab_abonne)
   {
     foreach($tab_abonne as $eleve_id => $notification_intro_eleve)
     {
       if($presence)
       {
         DB_STRUCTURE_NOTIFICATION::DB_modifier_log_attente( $abonne_id , $abonnement_ref_saisie , $devoir_id , $notification_date , $notification_intro_eleve.$notification_contenu.$notification_lien , 'remplacer' );
       }
       else
       {
         DB_STRUCTURE_NOTIFICATION::DB_supprimer_log_attente( $abonnement_ref_saisie , $devoir_id , $abonne_id );
       }
     }