next_lesson doesn't correctly work with changing validity ranges and probably also year changes
Currently, there are multiple issues:
-
next_lesson
is used on a queryset with lesson periods from multiple validity ranges. - Selecting the next item just by index (or, if there is no next item, selecting the first item and switching the week) doesn't work if there are lesson periods from multiple validity ranges.
- Also, year changes doesn't work correctly if there are multiple validity ranges.