feat: add score histo

This commit is contained in:
2025-08-09 12:29:35 +02:00
parent 0e87a457af
commit 859e496152
8 changed files with 604 additions and 15 deletions

View File

@@ -253,7 +253,7 @@
<div class="text-sm text-orange-700">moyenne générale</div>
<div class="text-xs text-orange-600 mt-1" data-result="assessments_count">0 évaluation(s)</div>
</div>
<div class="grid grid-cols-2 gap-3 text-sm">
<div class="grid grid-cols-2 gap-3 text-sm mb-4">
<div class="bg-orange-50 rounded-lg p-3 border border-orange-100">
<div class="flex justify-between items-center">
<span class="text-orange-800 font-medium">Min:</span>
@@ -279,6 +279,22 @@
</div>
</div>
</div>
{# Histogramme des moyennes des élèves #}
<div class="bg-orange-50 rounded-lg p-4 border border-orange-100">
<h4 class="text-sm font-semibold text-orange-900 mb-3 flex items-center">
<svg class="w-4 h-4 text-orange-500 mr-2" fill="currentColor" viewBox="0 0 20 20">
<path d="M2 11a1 1 0 011-1h2a1 1 0 011 1v5a1 1 0 01-1 1H3a1 1 0 01-1-1v-5zM8 7a1 1 0 011-1h2a1 1 0 011 1v9a1 1 0 01-1 1H9a1 1 0 01-1-1V7zM14 4a1 1 0 011-1h2a1 1 0 011 1v12a1 1 0 01-1 1h-2a1 1 0 01-1-1V4z"/>
</svg>
Distribution des moyennes
</h4>
<div class="relative h-32">
<canvas id="studentAveragesChart" class="w-full h-full"></canvas>
<div class="absolute inset-0 flex items-center justify-center text-orange-600 text-sm" data-chart-no-data style="display: none;">
Aucune donnée disponible
</div>
</div>
</div>
</div>
</div>
</div>
@@ -429,6 +445,7 @@
{% endblock %}
{% block head %}
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="{{ url_for('static', filename='js/ClassDashboard.js') }}"></script>
<style>
/* Fix pour éviter le clipping des hover effects sur cette page */