mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-09 07:28:41 -07:00
29 lines
683 B
Ruby
29 lines
683 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Analyze
|
|
module Graph
|
|
module Column
|
|
class AllStudent < GroupedBarColumnPresenter
|
|
def label
|
|
'All Students'
|
|
end
|
|
|
|
def show_irrelevancy_message?
|
|
!measure.includes_student_survey_items?
|
|
end
|
|
|
|
def show_insufficient_data_message?
|
|
scores = academic_years.map do |year|
|
|
measure.score(school:, academic_year: year)
|
|
end
|
|
|
|
scores.all? { |score| !score.meets_student_threshold? }
|
|
end
|
|
|
|
def score(year_index)
|
|
measure.student_score(school:, academic_year: academic_years[year_index])
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|