You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sqm-dashboards/app/presenters/teacher_grouped_bar_column_...

28 lines
570 B

# frozen_string_literal: true
class TeacherGroupedBarColumnPresenter < GroupedBarColumnPresenter
def label
'All Teachers'
end
def basis
'teacher'
end
def show_irrelevancy_message?
!measure.includes_teacher_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_teacher_threshold? }
end
def score(year_index)
measure.teacher_score(school:, academic_year: academic_years[year_index])
end
end