Bugfix/attendance calendars from bell schedules #88
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description & motivation
Addresses an edge case in the
fct_student_daily_attendance
model. Students who only attend school part-time (only on Tuesday/Thursday, for example) are currently shown to be in attendance on days they don't go to school. This PR fixes that by constructing the calendar of possible attendance days for each student based on their class schedules.Changes to existing files:
fct_student_daily_attendance
: Replace the calendar-constructing steps with a join to the newly added build model.New files created:
bld_ef3__student_school_days
: Constructs the student-school level instructional calendars, including logic that was previously infct_student_daily_attendance
for removing non-instructional days and any that fall outside the student's enrollment. Put this in a separate model to keep it readable given of the large number of joins required.Tests and QC done:
Confirmed that it fixed the identified edge cases without creating any new inaccuracies for three schools in Jeffco. Additional QC to be done before marking ready for review.
Future ToDos & Questions:
It's possible that this creates more problems than it solves when bell schedule data is bad or incomplete.
PR Merge Priority: