// ////////////////////////////////////////////////////////////////////////////////////////////////////
// Affichage du bilan des affectations des périodes aux classes & groupes ; en plusieurs requêtes pour récupérer les périodes sans classes-groupes et les classes-groupes sans périodes
// ////////////////////////////////////////////////////////////////////////////////////////////////////
$tab_groupe = array();
$tab_periode = array();
$tab_jointure = array();
// Récupérer la liste des classes & groupes, dans l'ordre des niveaux
switch ($_SESSION['USER_PROFIL_TYPE']) {
    case 'directeur':
        $DB_TAB = DB_STRUCTURE_ADMINISTRATEUR::DB_lister_classes_et_groupes_avec_niveaux();
        break;
    case 'professeur':
        $DB_TAB = DB_STRUCTURE_PROFESSEUR::DB_lister_classes_groupes_professeur($_SESSION['USER_ID'], $_SESSION['USER_JOIN_GROUPES']);
        break;
    case 'parent':
        $DB_TAB = DB_STRUCTURE_ELEVE::DB_lister_classes_parent($_SESSION['USER_ID']);
        break;
    case 'eleve':
        $DB_TAB = array(0 => array('groupe_id' => $_SESSION['ELEVE_CLASSE_ID'], 'groupe_nom' => $_SESSION['ELEVE_CLASSE_NOM']));
}
if (!empty($DB_TAB)) {
    foreach ($DB_TAB as $DB_ROW) {
        $tab_groupe[$DB_ROW['groupe_id']] = '<th>' . html($DB_ROW['groupe_nom']) . '</th>';
    }
    // Récupérer la liste des périodes, dans l'ordre choisi par l'admin
    $DB_TAB = DB_STRUCTURE_ADMINISTRATEUR::DB_lister_periodes();
    if (!empty($DB_TAB)) {
        foreach ($DB_TAB as $DB_ROW) {
            $tab_periode[$DB_ROW['periode_id']] = '<th>' . html($DB_ROW['periode_nom']) . '</th>';
        }
        // Récupérer la liste des jointures
Esempio n. 2
0
//	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
//	Supprimer une demande
//	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-

if( ($action=='supprimer') && $demande_id && $item_id && $matiere_id )
{
	DB_STRUCTURE_ELEVE::DB_supprimer_demande_precise($demande_id);
	// Récupérer la référence et le nom de l'item
	$DB_ROW = DB_STRUCTURE_ELEVE::DB_recuperer_item_infos($item_id);
	// Ajout aux flux RSS des profs concernés
	$titre = 'Demande retirée par '.$_SESSION['USER_NOM'].' '.$_SESSION['USER_PRENOM']{0}.'.';
	$texte = $_SESSION['USER_PRENOM'].' '.$_SESSION['USER_NOM'].' retire sa demande '.$DB_ROW['item_ref'].' "'.$DB_ROW['item_nom'].'"';
	$guid  = 'demande_'.$demande_id.'_del';
	// On récupère les profs...
	$DB_COL = DB_STRUCTURE_ELEVE::DB_recuperer_professeurs_eleve_matiere($_SESSION['USER_ID'],$matiere_id);
	foreach($DB_COL as $prof_id)
	{
		Modifier_RSS(adresse_RSS($prof_id),$titre,$texte,$guid);
	}
	// Affichage du retour
	exit('ok');
}

//	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
//	On ne devrait pas en arriver là...
//	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-

exit('Erreur avec les données transmises !');

?>
Esempio n. 3
0
 // L'information associée à la note comporte le nom de l'évaluation + celui du professeur (c'est une information statique, conservée sur plusieurs années)
 $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;
Esempio n. 4
0
<form action="#" method="post">
	<table class="form hsort">
		<thead>
			<tr>
				<th>Date</th>
				<th>Matière</th>
				<th>Item</th>
				<th>Score</th>
				<th>Statut</th>
				<th class="nu"></th>
			</tr>
		</thead>
		<tbody>
			<?php
			// Lister les demandes d'évaluation
			$DB_TAB = DB_STRUCTURE_ELEVE::DB_lister_demandes_eleve($_SESSION['USER_ID']);
			foreach($DB_TAB as $DB_ROW)
			{
				$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 class="lien_ext" href="'.html($DB_ROW['item_lien']).'">' : '';
				$texte_lien_apres = ($DB_ROW['item_lien']) ? '</a>' : '';
				// Afficher une ligne du tableau 
				echo'<tr id="ids_'.$DB_ROW['demande_id'].'_'.$DB_ROW['item_id'].'_'.$DB_ROW['matiere_id'].'">';
				echo	'<td><i>'.html($DB_ROW['demande_date']).'</i>'.convert_date_mysql_to_french($DB_ROW['demande_date']).'</td>';
				echo	'<td>'.html($DB_ROW['matiere_nom']).'</td>';
				echo	'<td>'.$texte_lien_avant.html($DB_ROW['item_ref']).$texte_lien_apres.' <img alt="" src="./_img/bulle_aide.png" title="'.html($DB_ROW['item_nom']).'" /></td>';
				echo	affich_score_html($score,'score',$pourcent='');
				echo	'<td>'.$statut.'</td>';
				echo	'<td class="nu"><q class="supprimer" title="Supprimer cette demande d\'évaluation."></q></td>';
				echo'</tr>';
Esempio n. 5
0
        if ($nb_etat_eleve) {
            $s = $DB_TAB['eleve']['nombre'] > 1 ? 's' : '';
            $tab_accueil['demandes']['contenu'] .= '<p>Vous avez <a href="./index.php?page=' . $page . '"><span class="b">' . $nb_etat_eleve . ' demande' . $s . ' d\'évaluation' . $s . '</span></a> en attente de réponse.</p>';
        }
        if ($nb_etat_prof) {
            $s = $DB_TAB['prof']['nombre'] > 1 ? 's' : '';
            $tab_accueil['demandes']['contenu'] .= '<p>Vous avez <a href="./index.php?page=' . $page . '"><span class="b">' . $nb_etat_prof . ' demande' . $s . ' d\'évaluation' . $s . '</span></a> en cours de préparation.</p>';
        }
    }
}
// ////////////////////////////////////////////////////////////////////////////////////////////////////
// [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
Esempio n. 6
0
		{
			$item_id = (int)substr($key,5);
			$note    = $val;
			$tab_post[$item_id] = $note;
		}
	}
	if(!count($tab_post))
	{
		exit('Aucune saisie récupérée !');
	}
	// On recupère le contenu de la base déjà enregistré pour le comparer ; on remplit au fur et à mesure $tab_nouveau_modifier / $tab_nouveau_supprimer
	// $tab_demande_supprimer sert à supprimer des demandes d'élèves dont on met une note.
	$tab_nouveau_modifier = array();
	$tab_nouveau_supprimer = array();
	$tab_demande_supprimer = array();
	$DB_TAB = DB_STRUCTURE_ELEVE::DB_lister_saisies_devoir_eleve( $devoir_id , $_SESSION['USER_ID'] , TRUE /*with_REQ*/ );
	foreach($DB_TAB as $DB_ROW)
	{
		$item_id = (int)$DB_ROW['item_id'];
		if(isset($tab_post[$item_id])) // Test nécessaire si élève ou item évalués dans ce devoir, mais retiré depuis (donc non transmis dans la nouvelle saisie, mais à conserver).
		{
			if($tab_post[$item_id]!=$DB_ROW['saisie_note'])
			{
				if($tab_post[$item_id]=='X')
				{
					// valeur de la base à supprimer
					$tab_nouveau_supprimer[$item_id] = $item_id;
				}
				else
				{
					// valeur de la base à modifier