mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-13 09:20:38 -07:00
working on yearly aggregation
This commit is contained in:
parent
9734b7dc06
commit
10945d6c71
2 changed files with 8 additions and 8 deletions
|
|
@ -426,14 +426,14 @@ namespace :data do
|
|||
end
|
||||
|
||||
def sync_school_category_aggregates
|
||||
year = '2018'
|
||||
year = 2018
|
||||
School.all.each do |school|
|
||||
Category.all.each do |category|
|
||||
school_category = SchoolCategory.for(school, category).in(year).first
|
||||
if school_category.nil?
|
||||
school_category = school.school_categories.create(category: category, year: year)
|
||||
end
|
||||
school_category.sync_aggregated_responses(year)
|
||||
school_category.sync_aggregated_responses
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue