Add pupil absence data to school details modal
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s

Display test absence percentages (reading, maths, GPS, writing, science)
in a new section in the school modal. Requires database re-import.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Tudor
2026-01-16 09:58:11 +00:00
parent 5bd49d3a03
commit 352eeec2db
3 changed files with 123 additions and 1 deletions

View File

@@ -120,6 +120,36 @@ const TERM_DEFINITIONS = {
description: "The total number of pupils enrolled at the school.",
note: null,
},
reading_absence: {
title: "Reading Test Absence",
description:
"The percentage of pupils who were absent from or unable to access the Reading test on test day.",
note: "Includes pupils who were ill, absent, or had circumstances preventing access.",
},
gps_absence: {
title: "GPS Test Absence",
description:
"The percentage of pupils who were absent from or unable to access the Grammar, Punctuation and Spelling test.",
note: "Includes pupils who were ill, absent, or had circumstances preventing access.",
},
maths_absence: {
title: "Maths Test Absence",
description:
"The percentage of pupils who were absent from or unable to access the Maths test on test day.",
note: "Includes pupils who were ill, absent, or had circumstances preventing access.",
},
writing_absence: {
title: "Writing Absence/Disapplied",
description:
"The percentage of pupils who were absent from or disapplied from the Writing teacher assessment.",
note: "Disapplied means formally removed from assessment, usually due to significant special needs.",
},
science_absence: {
title: "Science Absence/Disapplied",
description:
"The percentage of pupils who were absent from or disapplied from the Science teacher assessment.",
note: "Disapplied means formally removed from assessment, usually due to significant special needs.",
},
};
// Warning definitions for alerts/notices
@@ -1744,6 +1774,31 @@ async function openSchoolModal(urn) {
</div>
</div>
</div>
<div class="modal-stats-section">
<h4>Test Absence (${latest.year})</h4>
<div class="modal-stats-grid">
<div class="modal-stat">
<div class="modal-stat-value">${formatMetricValue(latest.reading_absence_pct, "reading_absence_pct")}</div>
<div class="modal-stat-label">Reading${createInfoTrigger("reading_absence")}</div>
</div>
<div class="modal-stat">
<div class="modal-stat-value">${formatMetricValue(latest.maths_absence_pct, "maths_absence_pct")}</div>
<div class="modal-stat-label">Maths${createInfoTrigger("maths_absence")}</div>
</div>
<div class="modal-stat">
<div class="modal-stat-value">${formatMetricValue(latest.gps_absence_pct, "gps_absence_pct")}</div>
<div class="modal-stat-label">GPS${createInfoTrigger("gps_absence")}</div>
</div>
<div class="modal-stat">
<div class="modal-stat-value">${formatMetricValue(latest.writing_absence_pct, "writing_absence_pct")}</div>
<div class="modal-stat-label">Writing${createInfoTrigger("writing_absence")}</div>
</div>
<div class="modal-stat">
<div class="modal-stat-value">${formatMetricValue(latest.science_absence_pct, "science_absence_pct")}</div>
<div class="modal-stat-label">Science${createInfoTrigger("science_absence")}</div>
</div>
</div>
</div>
`;
function getProgressClass(value) {