mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
Split academic year into seasons if the academic year's range is
initialized with a season, i.e. "2024-25 Fall". Update scapers for admin data, enrollment and staffing to use the new range standard correctly. Update the loaders for admin data, enrollment and staffing so that it populates all seasons in a given year. So admin data for 2024-25 gets loaded into "2024-25 Fall" and "2024-25 Spring". Add tests for the new range format. Set the default cutoff for the start of Spring season will be the last Sunday in February
This commit is contained in:
parent
996bb01d0b
commit
33da0859b9
43 changed files with 62404 additions and 28698 deletions
|
|
@ -122,16 +122,14 @@ class Seeder
|
|||
|
||||
def seed_enrollment(csv_file)
|
||||
EnrollmentLoader.load_data(filepath: csv_file)
|
||||
missing_enrollment_for_current_year = Respondent.where(academic_year: AcademicYear.order(:range).last).count.zero?
|
||||
|
||||
EnrollmentLoader.clone_previous_year_data if missing_enrollment_for_current_year
|
||||
EnrollmentLoader.clone_previous_year_data
|
||||
end
|
||||
|
||||
def seed_staffing(csv_file)
|
||||
StaffingLoader.load_data(filepath: csv_file)
|
||||
missing_staffing_for_current_year = Respondent.where(academic_year: AcademicYear.order(:range).last).group(:total_teachers).having("total_teachers > 0").count.count.zero?
|
||||
|
||||
StaffingLoader.clone_previous_year_data if missing_staffing_for_current_year
|
||||
StaffingLoader.clone_previous_year_data
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue