Schedule for an "s.o." semester loads in perpetuity
DylanApardian opened this issue · comments
Describe the bug
Whenever I try to view the schedule of a semester with no active semester (s.o.), the page seems to be loading forever while displaying that "There are no events scheduled at the moment".
To Reproduce
Steps to reproduce the behavior:
- Go to the
Student
page - Click on the calendar icon of a semester with "No active semester"
- Observe that the page seems to be loading forever
Expected behavior
The loading icon should not be spinning forever. It should say that "There are no events scheduled at the moment".
Smartphone (please complete the following information):
- Device: Pixel 6
- OS: Android 14
- Browser: Chrome v122
- Version: 4.38.2 (ETSMobile)
Additional context
The session seems to be equal to s.o.
meaning no active semester. It seems like in 2 other areas in the code (grades_viewmodel.dart
) there's a check for == "s.o."
.
A simple fix would be to also check for s.o.
in course_repository.getDefaultScheduleActivities()
.
Although, I feel like we should define s.o.
as constant and use that instead of hard-coding it in now, 3 places...
if (session == null || session == "s.o.") {
_logger.d(
"$tag - getScheduleDefaultActivities: Session is null, returning empty list.");
return [];
}