"Next Subject Lesson" button doesn't work across ValidityRanges
Steps to reproduce:
- Create a
ValidityRange
and aLesson
connected to it, with a specific teacher, group and subject (e.g. "M"). - Repeat step one with a new
ValidityRange
(date start after date end of the first one) andLesson
with the same attributes. - Open the class register for a
LessonPeriod
of the firstValidityRange
and click on "Next M Lesson".
Result:
Within the first ValidityRange
it works fine. But the button on the last LessonPeriod
s register page of the first VR
links to an empty page.
It's because of the week not being incremented. So it tries to find an LP
of the new VR
in the week before the VR
starts.
I think this issue is caused by a questionable design choice, which (if I understand the code correctly) assumes that an LP
with a lower ID is earlier in a week.
Probably this works most of the time, when the timetable data is imported chronologically, but it cannot be relied on. There has to be a comparison based on weekday
and period
.