diff --git a/frontend/student/dashboard.php b/frontend/student/dashboard.php index f3ad702..42db220 100644 --- a/frontend/student/dashboard.php +++ b/frontend/student/dashboard.php @@ -393,6 +393,7 @@ include __DIR__ . '/../includes/header.php'; async function loadHomework() { try { const res = await apiGet(`/api/student/homework/${STUDENT_ID}`); + let html = ''; if (res && res.success) { res.data.homework.forEach(record => { const pointsClass = record.points_change > 0 ? 'plus' : 'minus'; @@ -410,7 +411,6 @@ include __DIR__ . '/../includes/header.php'; if (res.data.homework.length === 0) { html = '