$chemin_devoir = CHEMIN_DOSSIER_DEVOIR . $_SESSION['BASE'] . DS; $url_dossier_devoir = URL_DIR_DEVOIR . $_SESSION['BASE'] . '/'; // //////////////////////////////////////////////////////////////////////////////////////////////////// // Afficher une liste d'évaluations // //////////////////////////////////////////////////////////////////////////////////////////////////// if ($action == 'Afficher_evaluations' && $eleve_id && $date_debut && $date_fin) { // Formater les dates $date_debut_mysql = convert_date_french_to_mysql($date_debut); $date_fin_mysql = convert_date_french_to_mysql($date_fin); // Vérifier que la date de début est antérieure à la date de fin if ($date_debut_mysql > $date_fin_mysql) { exit('Erreur : la date de début est postérieure à la date de fin !'); } // Lister les évaluations $script = ''; $DB_TAB = DB_STRUCTURE_ELEVE::DB_lister_devoirs_eleve($eleve_id, $date_debut_mysql, $date_fin_mysql, $_SESSION['USER_PROFIL_TYPE']); if (empty($DB_TAB)) { exit('Aucune évaluation trouvée sur la période ' . $date_debut . ' ~ ' . $date_fin . ' !'); } foreach ($DB_TAB as $DB_ROW) { $date_affich = convert_date_mysql_to_french($DB_ROW['devoir_date']); $image_sujet = $DB_ROW['devoir_doc_sujet'] ? '<a href="' . $DB_ROW['devoir_doc_sujet'] . '" target="_blank" class="no_puce"><img alt="sujet" src="./_img/document/sujet_oui.png" title="Sujet disponible." /></a>' : '<img alt="sujet" src="./_img/document/sujet_non.png" />'; $image_corrige = $DB_ROW['devoir_doc_corrige'] ? '<a href="' . $DB_ROW['devoir_doc_corrige'] . '" target="_blank" class="no_puce"><img alt="corrigé" src="./_img/document/corrige_oui.png" title="Corrigé disponible." /></a>' : '<img alt="corrigé" src="./_img/document/corrige_non.png" />'; $q_texte = $DB_ROW['jointure_texte'] ? '<q class="texte_consulter" title="Commentaire écrit disponible."></q>' : '<q class="texte_consulter_non" title="Pas de commentaire écrit."></q>'; $q_audio = $DB_ROW['jointure_audio'] ? '<q class="audio_ecouter" title="Commentaire audio disponible."></q>' : '<q class="audio_ecouter_non" title="Pas de commentaire audio."></q>'; // Afficher une ligne du tableau echo '<tr>'; echo '<td>' . html($date_affich) . '</td>'; echo '<td>' . html(afficher_identite_initiale($DB_ROW['prof_nom'], FALSE, $DB_ROW['prof_prenom'], TRUE, $DB_ROW['prof_genre'])) . '</td>'; echo '<td>' . html($DB_ROW['devoir_info']) . '</td>'; echo '<td>' . $image_sujet . $image_corrige . '</td>';
$classe_id = $_SESSION['ELEVE_CLASSE_ID']; } elseif( ($_SESSION['USER_PROFIL']=='parent') && ($_SESSION['NB_ENFANTS']!=1) ) { foreach($_SESSION['OPT_PARENT_ENFANTS'] as $tab_info) { if($tab_info['valeur']==$eleve_id) { $classe_id = $tab_info['classe_id']; break; } } } // Lister les évaluations $script = ''; $DB_TAB = DB_STRUCTURE_ELEVE::DB_lister_devoirs_eleve($eleve_id,$classe_id,$date_debut_mysql,$date_fin_mysql); if(!count($DB_TAB)) { exit('Aucune évaluation trouvée sur cette période vous concernant !'); } foreach($DB_TAB as $DB_ROW) { $date_affich = convert_date_mysql_to_french($DB_ROW['devoir_date']); $image_sujet = ($DB_ROW['devoir_doc_sujet']) ? '<a href="'.$dossier_devoir.$DB_ROW['devoir_doc_sujet'].'" target="_blank"><img alt="sujet" src="./_img/document/sujet_oui.png" title="Sujet disponible." /></a>' : '<img alt="sujet" src="./_img/document/sujet_non.png" />' ; $image_corrige = ($DB_ROW['devoir_doc_corrige']) ? '<a href="'.$dossier_devoir.$DB_ROW['devoir_doc_corrige'].'" target="_blank"><img alt="corrigé" src="./_img/document/corrige_oui.png" title="Corrigé disponible." /></a>' : '<img alt="corrigé" src="./_img/document/corrige_non.png" />' ; // Afficher une ligne du tableau echo'<tr>'; echo '<td><i>'.html($DB_ROW['devoir_date']).'</i>'.html($date_affich).'</td>'; echo '<td>'.html($DB_ROW['prof_nom'].' '.$DB_ROW['prof_prenom']{0}.'.').'</td>'; echo '<td>'.html($DB_ROW['devoir_info']).'</td>'; echo '<td>'.$image_sujet.$image_corrige.'</td>';