CoreUtils::getAcademicYear() returns 2023, not 2022.
The query it runs is
SELECT start FROM public.terms WHERE descr='Autumn'
AND EXTRACT(year FROM start) = $1
where $1 is the current calendar year (date('Y')) in PHP. This returns no rows, because there's no record for the 2023 Autumn Term (because of semesterisation). As such MyRadio defaults to the current year (if there were an autumn term row it'd pick 2022 unless the first day of term was within 49 days).
The simple fix would be to insert a row for it, however this will need revising in September, so I'm wondering if we can do better here.
Given this data in the
terms
table:CoreUtils::getAcademicYear()
returns 2023, not 2022.The query it runs is
where
$1
is the current calendar year (date('Y')
) in PHP. This returns no rows, because there's no record for the 2023 Autumn Term (because of semesterisation). As such MyRadio defaults to the current year (if there were an autumn term row it'd pick 2022 unless the first day of term was within 49 days).The simple fix would be to insert a row for it, however this will need revising in September, so I'm wondering if we can do better here.