mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-17 09:46:25 -07:00
chore: show analyze page without errors
This commit is contained in:
parent
e4e6a5c7fb
commit
b47f8d2f61
84 changed files with 2243 additions and 1792 deletions
|
|
@ -1,31 +1,33 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Analyze
|
||||
module Graph
|
||||
module Column
|
||||
class AllStudent < GroupedBarColumnPresenter
|
||||
def label
|
||||
%w[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)
|
||||
module Dashboard
|
||||
module Analyze
|
||||
module Graph
|
||||
module Column
|
||||
class AllStudent < GroupedBarColumnPresenter
|
||||
def label
|
||||
%w[All Students]
|
||||
end
|
||||
|
||||
scores.all? { |score| !score.meets_student_threshold? }
|
||||
end
|
||||
def show_irrelevancy_message?
|
||||
!measure.includes_student_survey_items?
|
||||
end
|
||||
|
||||
def score(year_index)
|
||||
measure.student_score(school:, academic_year: academic_years[year_index])
|
||||
end
|
||||
def show_insufficient_data_message?
|
||||
scores = academic_years.map do |year|
|
||||
measure.score(school:, academic_year: year)
|
||||
end
|
||||
|
||||
def type
|
||||
:student
|
||||
scores.all? { |score| !score.meets_student_threshold? }
|
||||
end
|
||||
|
||||
def score(year_index)
|
||||
measure.student_score(school:, academic_year: academic_years[year_index])
|
||||
end
|
||||
|
||||
def type
|
||||
:student
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue