Source-of-truth attendance derivation
- Problem
- For hybrid sections, whether a given week was online or in person changes what 'present' even means - and guessing from a fixed schedule is wrong the moment a week deviates.
- Approach
- Read the truth from Populi instead of assuming it. get_week_type() derives ONLINE vs. IN-PERSON from each meeting's is_online field; get_week_num() anchors the term week number to the Monday of the term-start week; and assignment filtering uses a week_end + 1 day cutoff so a Sunday-night submission in a US timezone (early Monday UTC) still counts for the right week.
- Result
- Week classification that stays correct as real schedules drift, without per-course hand-tuning.