From e843394d57709f7e63b4c4ffe7a2ae66ae4333f2 Mon Sep 17 00:00:00 2001 From: Tudor Date: Thu, 15 Jan 2026 10:15:41 +0000 Subject: [PATCH] Show progress scores from most recent available year Progress scores aren't available for 2023-24 and 2024-25 due to KS1 SATs being cancelled in 2020-2021. Now the modal finds and displays progress scores from the most recent year they're available, with the correct year shown in the header. Co-Authored-By: Claude Opus 4.5 --- frontend/app.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/frontend/app.js b/frontend/app.js index db23703..d51b305 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -1375,6 +1375,13 @@ async function openSchoolModal(urn) { const previous = sortedData[latestIndex + 1] || null; const prevRwm = previous?.rwm_expected_pct; + // Find latest year with progress score data (not available for 2023-24, 2024-25) + const latestWithProgress = sortedData.find( + (d) => d.reading_progress !== null || d.writing_progress !== null || d.maths_progress !== null + ); + const progressYear = latestWithProgress?.year || latest.year; + const progressData = latestWithProgress || latest; + elements.modalStats.innerHTML = `