From 1413fe3c9cc8297b045f3fd530ff28bd93f76d47 Mon Sep 17 00:00:00 2001 From: nicoboy Date: Fri, 2 Jan 2026 16:17:59 +0100 Subject: [PATCH] modification du monitoring enseignant --- enseignant/monitoring.php | 464 ++++++++++++++++++++++++-------------- 1 file changed, 292 insertions(+), 172 deletions(-) diff --git a/enseignant/monitoring.php b/enseignant/monitoring.php index e2251fa..b84f9bf 100644 --- a/enseignant/monitoring.php +++ b/enseignant/monitoring.php @@ -1,7 +1,7 @@ fetchAll(PDO::FETCH_ASSOC); $nb_questions = count($questions); + // Calculer dimensions matrice optimales (proche du carré) + $cols = ceil(sqrt($nb_questions)); + $rows = ceil($nb_questions / $cols); + } catch (Exception $e) { die('Erreur: ' . $e->getMessage()); } @@ -67,7 +71,7 @@ try { } .container { - max-width: 1400px; + max-width: 1600px; margin: 0 auto; } @@ -133,79 +137,73 @@ try { margin-top: 5px; } - .monitoring-table { + /* Cards élèves */ + .eleves-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); + gap: 20px; + } + + .eleve-card { background: white; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); - overflow: hidden; + padding: 20px; + transition: transform 0.2s, box-shadow 0.2s; } - table { - width: 100%; - border-collapse: collapse; + .eleve-card:hover { + transform: translateY(-5px); + box-shadow: 0 8px 15px rgba(0,0,0,0.2); } - thead { - background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); - color: white; + .eleve-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 15px; + padding-bottom: 15px; + border-bottom: 2px solid #f0f0f0; } - thead th { - padding: 15px 10px; - text-align: left; + .eleve-info { + flex: 1; + } + + .eleve-name { + font-size: 18px; font-weight: 600; + color: #333; + margin-bottom: 5px; + } + + .eleve-classe { font-size: 14px; + color: #666; + } + + .status-badge { + padding: 6px 12px; + border-radius: 20px; + font-size: 12px; + font-weight: 600; white-space: nowrap; } - thead th.question-col { - text-align: center; - min-width: 40px; - } + .status-en-ligne { background: #d4edda; color: #155724; } + .status-en-cours { background: #fff3cd; color: #856404; } + .status-inactif { background: #fff3cd; color: #856404; } + .status-hors-ligne { background: #f8d7da; color: #721c24; } + .status-termine { background: #e2e3e5; color: #383d41; } - tbody tr { - border-bottom: 1px solid #f0f0f0; - transition: background 0.2s; - } - - tbody tr:hover { - background: #f8f9fa; - } - - tbody td { - padding: 12px 10px; - font-size: 14px; - } - - .status-indicator { - width: 12px; - height: 12px; - border-radius: 50%; - display: inline-block; - margin-right: 8px; - } - - .status-en-ligne { background: #28a745; } - .status-en-cours { background: #ffc107; } - .status-inactif { background: #fd7e14; } - .status-hors-ligne { background: #dc3545; } - .status-termine { background: #6c757d; } - - .question-cell { - text-align: center; - font-size: 18px; - cursor: pointer; - transition: transform 0.2s; - } - - .question-cell:hover { - transform: scale(1.2); + .progress-section { + margin-bottom: 15px; } .progress-bar-container { background: #e9ecef; border-radius: 10px; - height: 20px; + height: 25px; overflow: hidden; position: relative; } @@ -213,73 +211,107 @@ try { .progress-bar { height: 100%; background: linear-gradient(90deg, #28a745 0%, #20c997 100%); - transition: width 0.3s ease; + transition: width 0.5s ease; display: flex; align-items: center; justify-content: center; color: white; - font-size: 11px; + font-size: 13px; font-weight: bold; } .progress-text { - font-size: 12px; + font-size: 13px; color: #666; - margin-top: 3px; - } - - .eleve-name { - font-weight: 600; - color: #333; - } - - .eleve-classe { - font-size: 12px; - color: #666; - display: block; + margin-top: 5px; + text-align: center; } .time-info { + display: flex; + justify-content: space-between; font-size: 12px; color: #666; + margin-bottom: 15px; + } + + /* Matrice questions */ + .questions-matrix { + display: grid; + grid-template-columns: repeat(, 1fr); + gap: 4px; + margin-top: 10px; + } + + .question-cell { + aspect-ratio: 1; + display: flex; + align-items: center; + justify-content: center; + font-size: 16px; + border-radius: 4px; + cursor: pointer; + transition: transform 0.2s, box-shadow 0.2s; + background: #f8f9fa; + position: relative; + } + + .question-cell:hover { + transform: scale(1.15); + box-shadow: 0 4px 8px rgba(0,0,0,0.2); + z-index: 10; + } + + .question-cell.repondu { + background: #cce5ff; + } + + .question-cell.correct { + background: #d4edda; + } + + .question-cell.incorrect { + background: #f8d7da; + } + + .question-number { + position: absolute; + top: 2px; + left: 3px; + font-size: 8px; + font-weight: 600; + color: #666; } - .legende { - background: white; - padding: 15px 30px; - border-radius: 10px; - box-shadow: 0 4px 6px rgba(0,0,0,0.1); - margin-top: 20px; + .matrix-legend { display: flex; - gap: 30px; - flex-wrap: wrap; - align-items: center; + justify-content: center; + gap: 15px; + margin-top: 10px; + font-size: 11px; + color: #666; } - .legende-title { - font-weight: 600; - color: #333; - } - - .legende-item { + .matrix-legend-item { display: flex; align-items: center; - gap: 8px; - font-size: 14px; + gap: 5px; } .btn-retour { - background: #6c757d; - color: white; + background: white; + color: #667eea; + border: 2px solid #667eea; padding: 10px 20px; - border-radius: 5px; + border-radius: 8px; text-decoration: none; - font-size: 14px; - transition: background 0.2s; + font-weight: 600; + transition: all 0.3s; } .btn-retour:hover { - background: #5a6268; + background: #667eea; + color: white; } @keyframes spin { @@ -292,9 +324,50 @@ try { .no-data { text-align: center; - padding: 40px; + padding: 60px 20px; color: #666; font-size: 16px; + background: white; + border-radius: 10px; + box-shadow: 0 4px 6px rgba(0,0,0,0.1); + } + + /* Légende globale */ + .legende { + background: white; + padding: 20px; + border-radius: 10px; + box-shadow: 0 4px 6px rgba(0,0,0,0.1); + margin-top: 20px; + display: flex; + flex-wrap: wrap; + gap: 20px; + align-items: center; + font-size: 13px; + } + + .legende-title { + font-weight: 600; + color: #333; + } + + .legende-item { + display: flex; + align-items: center; + gap: 8px; + } + + .tooltip { + position: absolute; + background: rgba(0,0,0,0.9); + color: white; + padding: 8px 12px; + border-radius: 6px; + font-size: 12px; + white-space: nowrap; + pointer-events: none; + z-index: 1000; + display: none; } @@ -307,6 +380,9 @@ try { - + + ( questions - matrice ×) +
@@ -341,68 +417,51 @@ try {
- -
- - - - - - - - - - - - - - - - - - -
StatutÉlèveProgressionTemps écouléDernière activité - Q -
- 🔄 Chargement des données... -
+ +
+
+ 🔄 Chargement des données... +
Légende :
- - En ligne (<1 min) + + Non répondu
- - En cours (<3 min) + + ✅ Répondu
- - Inactif (3-5 min) + + ✔️ Correct
- - Hors ligne (>5 min) + + ❌ Incorrect +
+
+ 🟢 En ligne (<1min)
- - Terminé + 🟡 En cours (<3min)
-
- ⬜ Vide - ✅ Répondu - ✔️ Correct - ❌ Incorrect +
+ 🔴 Inactif (>3min)
+ +
+ - + \ No newline at end of file