mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
fix: Fixes #187294757. Data is hidden when selecting multiple years if the default year has no student data to show
This commit is contained in:
parent
4da1aef59b
commit
49a838c060
5 changed files with 7 additions and 7 deletions
|
|
@ -8,7 +8,7 @@ module Analyze
|
|||
end
|
||||
|
||||
def n_size(year_index)
|
||||
SurveyItemResponse.where(ell:, survey_item: measure.student_survey_items, school:, grade: grades(year_index),
|
||||
SurveyItemResponse.where(ell:, survey_item: measure.student_survey_items, school:, grade: grades,
|
||||
academic_year: academic_years[year_index]).select(:response_id).distinct.count
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ module Analyze
|
|||
end
|
||||
|
||||
def n_size(year_index)
|
||||
SurveyItemResponse.where(gender:, survey_item: measure.student_survey_items, school:, grade: grades(year_index),
|
||||
SurveyItemResponse.where(gender:, survey_item: measure.student_survey_items, school:, grade: grades,
|
||||
academic_year: academic_years[year_index]).select(:response_id).distinct.count
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ module Analyze
|
|||
end
|
||||
|
||||
def n_size(year_index)
|
||||
SurveyItemResponse.where(survey_item: measure.student_survey_items, school:, grade: grades(year_index),
|
||||
SurveyItemResponse.where(survey_item: measure.student_survey_items, school:, grade: grades,
|
||||
academic_year: academic_years[year_index]).select(:response_id).distinct.count
|
||||
end
|
||||
|
||||
|
|
@ -145,8 +145,8 @@ module Analyze
|
|||
end
|
||||
end
|
||||
|
||||
def grades(year_index)
|
||||
Respondent.by_school_and_year(school:, academic_year: academic_years[year_index]).enrollment_by_grade.keys
|
||||
def grades
|
||||
Respondent.by_school_and_year(school:, academic_year: academic_years)&.enrollment_by_grade&.keys
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ module Analyze
|
|||
end
|
||||
|
||||
def n_size(year_index)
|
||||
SurveyItemResponse.where(income:, survey_item: measure.student_survey_items, school:, grade: grades(year_index),
|
||||
SurveyItemResponse.where(income:, survey_item: measure.student_survey_items, school:, grade: grades,
|
||||
academic_year: academic_years[year_index]).select(:response_id).distinct.count
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ module Analyze
|
|||
end
|
||||
|
||||
def n_size(year_index)
|
||||
SurveyItemResponse.where(sped:, survey_item: measure.student_survey_items, school:, grade: grades(year_index),
|
||||
SurveyItemResponse.where(sped:, survey_item: measure.student_survey_items, school:, grade: grades,
|
||||
academic_year: academic_years[year_index]).select(:response_id).distinct.count
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue