Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is_instructional is useful again! #284

Merged
merged 7 commits into from
Oct 10, 2024
Merged

Conversation

pinwheeeel
Copy link
Contributor

#280

not a deprecation: is_instructional still exists, it just isn't editable by hand (automatically assigned when the model is saved), this is because it's easier to just store the boolean to later use it for determining a day's schedule

did not rename is_instructional to avoid making migrations but i cleaned up the help text a bit so hopefully its more clear

added 2 timetable formats (pa-day, holiday). they are empty and currently functionally identical

also various other small misc changes related to the calendar/events

Copy link
Member

@JasonLovesDoggo JasonLovesDoggo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering about the missing logic branch in events.py

core/api/views/events.py Show resolved Hide resolved
core/models/course.py Show resolved Hide resolved
schedule_formats = settings.TIMETABLE_FORMATS[self.term.timetable_format][
"schedules"
]
self.is_instructional = len(schedule_formats[self.schedule_format]) > 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't love this implementation, could be more explicit but it'll pass

metropolis/timetable_formats.py Show resolved Hide resolved
Copy link
Member

@JasonLovesDoggo JasonLovesDoggo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pinwheeeel pinwheeeel merged commit 790fd11 into wlmac:develop Oct 10, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants