/** * SpecialSchoolNote — the context note shown on special-school / PRU / AP * detail pages explaining why the mainstream England-average comparison is * dropped. Renders nothing for mainstream schools. * * The copy is type-aware: only genuine special schools have pupils with special * educational needs. Pupil referral units and alternative provision teach * pupils educated outside a mainstream setting (e.g. after exclusion, or for * medical reasons) who are not necessarily SEND — so their note says so rather * than mischaracterising them. Suppressing the England comparison is reasonable * for all three. */ import { isSpecialSchool } from '@/lib/utils'; import styles from './SpecialSchoolNote.module.css'; type SpecialKind = 'special' | 'pru' | 'ap'; function specialKind(schoolType: string | null | undefined): SpecialKind { const t = (schoolType ?? '').toLowerCase(); if (/pupil referral/.test(t)) return 'pru'; if (/alternative provision/.test(t)) return 'ap'; return 'special'; } export function SpecialSchoolNote({ school }: { school: { school_type?: string | null } }) { if (!isSpecialSchool(school)) return null; const kind = specialKind(school.school_type); return (
{kind === 'special' && ( <> This is a special school. Its pupils have special educational needs and work towards individual targets. They sit the same national assessments, but very few reach the mainstream “expected standard” these measures report, so a comparison with the England average isn’t a meaningful guide to the school. )} {kind === 'pru' && ( <> This is a pupil referral unit. It teaches pupils educated outside a mainstream school, for example after exclusion or for medical or behavioural reasons. The mainstream “expected standard” and the England-average comparison aren’t a meaningful guide to the school. )} {kind === 'ap' && ( <> This is an alternative provision setting. It teaches pupils educated outside a mainstream school. The mainstream “expected standard” and the England-average comparison aren’t a meaningful guide to the school. )}{' '} Where available, the progress its pupils make is a fairer measure.
); }