From 4283d4fc131756d52b13e8b0ea0d364043fda775 Mon Sep 17 00:00:00 2001 From: canglan Date: Wed, 22 Apr 2026 03:02:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=99=BE=E5=88=86=E6=AF=94?= =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/admin/dashboard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/admin/dashboard.php b/frontend/admin/dashboard.php index ea78013..aa23256 100644 --- a/frontend/admin/dashboard.php +++ b/frontend/admin/dashboard.php @@ -109,7 +109,7 @@ function applyPercentileFilter() { } const rows = document.getElementById('rankingList').querySelectorAll('tr'); if (rows.length === 0) return; - const showCount = Math.ceil(totalStudents * (percentile / 100)); + const showCount = Math.max(1, Math.floor(totalStudents * (percentile / 100))); rows.forEach(function(row, index) { row.style.display = index < showCount ? '' : 'none'; });