diff --git a/app/presenters/variance_chart_row_presenter.rb b/app/presenters/variance_chart_row_presenter.rb index 75e6e294..2c9dfa29 100644 --- a/app/presenters/variance_chart_row_presenter.rb +++ b/app/presenters/variance_chart_row_presenter.rb @@ -1,27 +1,22 @@ class VarianceChartRowPresenter include Comparable - attr_reader :score + attr_reader :score, :measure_name, :measure_id, :category def initialize(measure:, score:) @measure = measure @score = score.average @meets_teacher_threshold = score.meets_teacher_threshold? @meets_student_threshold = score.meets_student_threshold? + @measure_name = @measure.name + @measure_id = @measure.measure_id + @category = @measure.subcategory.category end def sufficient_data? @score != nil end - def measure_name - @measure.name - end - - def measure_id - @measure.measure_id - end - def bar_color "fill-#{zone.type}" end diff --git a/app/views/categories/_measures_section.html.erb b/app/views/categories/_measures_section.html.erb index d9e534c8..562b4a87 100644 --- a/app/views/categories/_measures_section.html.erb +++ b/app/views/categories/_measures_section.html.erb @@ -1,4 +1,4 @@ -
Measure <%= measure_presenter.id %>
Note: No measures can be displayed due to limited availability of school admin data and/or low survey response rates.
+Note: No measures can be displayed due to limited availability of school admin data and/or low survey response rates.
<% elsif not_displayed_presenters.present? %> -Note: The following measures are not displayed due to limited availability of school admin data and/or low survey response rates: <%= not_displayed_presenters.map(&:measure_name).join('; ') %>.
+Note: The following measures are not displayed due to limited availability of school admin data and/or low survey response rates: <%= not_displayed_presenters.map(&:measure_name).join('; ') %>.
<% end %>