diff --git a/app/presenters/analyze/graph/column/all_admin.rb b/app/presenters/analyze/graph/column/all_admin.rb
index 16a80c39..7cdb59be 100644
--- a/app/presenters/analyze/graph/column/all_admin.rb
+++ b/app/presenters/analyze/graph/column/all_admin.rb
@@ -9,24 +9,25 @@ module Analyze
end
def basis
- 'student'
+ 'admin data'
end
def show_irrelevancy_message?
- # !measure.includes_admin_data_items?
- false
+ !measure.includes_admin_data_items?
end
def show_insufficient_data_message?
- # academic_years.any? do |year|
- # measure.sufficient_admin_data?(school:, academic_year: year)
- # end
- false
+ !academic_years.any? do |year|
+ measure.sufficient_admin_data?(school:, academic_year: year)
+ end
+ end
+
+ def insufficiency_message
+ ['data not', 'available']
end
def score(year_index)
measure.admin_score(school:, academic_year: academic_years[year_index])
- # Score.new(average: 3)
end
end
end
diff --git a/app/presenters/analyze/graph/column/all_student.rb b/app/presenters/analyze/graph/column/all_student.rb
index bf689fe4..811563c3 100644
--- a/app/presenters/analyze/graph/column/all_student.rb
+++ b/app/presenters/analyze/graph/column/all_student.rb
@@ -8,10 +8,6 @@ module Analyze
'All Students'
end
- def basis
- 'student'
- end
-
def show_irrelevancy_message?
!measure.includes_student_survey_items?
end
diff --git a/app/presenters/analyze/graph/column/all_survey_data.rb b/app/presenters/analyze/graph/column/all_survey_data.rb
index 6d79d881..b0cf9036 100644
--- a/app/presenters/analyze/graph/column/all_survey_data.rb
+++ b/app/presenters/analyze/graph/column/all_survey_data.rb
@@ -8,10 +8,6 @@ module Analyze
'Survey Data'
end
- def basis
- 'student'
- end
-
def show_irrelevancy_message?
false
end
diff --git a/app/presenters/analyze/graph/column/all_teacher.rb b/app/presenters/analyze/graph/column/all_teacher.rb
index d8f94364..533ff29c 100644
--- a/app/presenters/analyze/graph/column/all_teacher.rb
+++ b/app/presenters/analyze/graph/column/all_teacher.rb
@@ -9,7 +9,7 @@ module Analyze
end
def basis
- 'teacher'
+ 'teacher surveys'
end
def show_irrelevancy_message?
diff --git a/app/presenters/analyze/graph/column/american_indian.rb b/app/presenters/analyze/graph/column/american_indian.rb
index 6994c12f..4ca2121c 100644
--- a/app/presenters/analyze/graph/column/american_indian.rb
+++ b/app/presenters/analyze/graph/column/american_indian.rb
@@ -9,10 +9,6 @@ module Analyze
'American Indian'
end
- def basis
- 'student'
- end
-
def show_irrelevancy_message?
false
end
diff --git a/app/presenters/analyze/graph/column/asian.rb b/app/presenters/analyze/graph/column/asian.rb
index d09a5383..b963cedf 100644
--- a/app/presenters/analyze/graph/column/asian.rb
+++ b/app/presenters/analyze/graph/column/asian.rb
@@ -9,10 +9,6 @@ module Analyze
'Asian'
end
- def basis
- 'student'
- end
-
def show_irrelevancy_message?
false
end
diff --git a/app/presenters/analyze/graph/column/black.rb b/app/presenters/analyze/graph/column/black.rb
index 742f4144..02d65420 100644
--- a/app/presenters/analyze/graph/column/black.rb
+++ b/app/presenters/analyze/graph/column/black.rb
@@ -9,10 +9,6 @@ module Analyze
'Black'
end
- def basis
- 'student'
- end
-
def show_irrelevancy_message?
false
end
diff --git a/app/presenters/analyze/graph/column/grouped_bar_column_presenter.rb b/app/presenters/analyze/graph/column/grouped_bar_column_presenter.rb
index 3b0700c8..e40c7148 100644
--- a/app/presenters/analyze/graph/column/grouped_bar_column_presenter.rb
+++ b/app/presenters/analyze/graph/column/grouped_bar_column_presenter.rb
@@ -106,6 +106,14 @@ module Analyze
number_of_columns
end
+ def basis
+ 'student surveys'
+ end
+
+ def insufficiency_message
+ ['survey response', 'rate below 25%']
+ end
+
private
YearlyScore = Struct.new(:year, :score)
diff --git a/app/presenters/analyze/graph/column/hispanic.rb b/app/presenters/analyze/graph/column/hispanic.rb
index 75e98f43..c365db1e 100644
--- a/app/presenters/analyze/graph/column/hispanic.rb
+++ b/app/presenters/analyze/graph/column/hispanic.rb
@@ -9,10 +9,6 @@ module Analyze
'Hispanic'
end
- def basis
- 'student'
- end
-
def show_irrelevancy_message?
false
end
diff --git a/app/presenters/analyze/graph/column/middle_eastern.rb b/app/presenters/analyze/graph/column/middle_eastern.rb
index fd196afb..6f918c22 100644
--- a/app/presenters/analyze/graph/column/middle_eastern.rb
+++ b/app/presenters/analyze/graph/column/middle_eastern.rb
@@ -10,10 +10,6 @@ module Analyze
'Middle Eastern'
end
- def basis
- 'student'
- end
-
def show_irrelevancy_message?
false
end
diff --git a/app/presenters/analyze/graph/column/multiracial.rb b/app/presenters/analyze/graph/column/multiracial.rb
index d1c0e398..87fa7802 100644
--- a/app/presenters/analyze/graph/column/multiracial.rb
+++ b/app/presenters/analyze/graph/column/multiracial.rb
@@ -9,10 +9,6 @@ module Analyze
'Multiracial'
end
- def basis
- 'student'
- end
-
def show_irrelevancy_message?
false
end
diff --git a/app/presenters/analyze/graph/column/unknown.rb b/app/presenters/analyze/graph/column/unknown.rb
index eaa02853..46d6cdd1 100644
--- a/app/presenters/analyze/graph/column/unknown.rb
+++ b/app/presenters/analyze/graph/column/unknown.rb
@@ -9,10 +9,6 @@ module Analyze
'Race/Ethnicity Not-Listed'
end
- def basis
- 'student'
- end
-
def show_irrelevancy_message?
false
end
diff --git a/app/presenters/analyze/graph/column/white.rb b/app/presenters/analyze/graph/column/white.rb
index ba9e8cfd..d07bff72 100644
--- a/app/presenters/analyze/graph/column/white.rb
+++ b/app/presenters/analyze/graph/column/white.rb
@@ -9,10 +9,6 @@ module Analyze
'White'
end
- def basis
- 'student'
- end
-
def show_irrelevancy_message?
false
end
diff --git a/app/views/analyze/_grouped_bar_column.html.erb b/app/views/analyze/_grouped_bar_column.html.erb
index 7cfaaac0..14fe98cc 100644
--- a/app/views/analyze/_grouped_bar_column.html.erb
+++ b/app/views/analyze/_grouped_bar_column.html.erb
@@ -24,14 +24,16 @@
measure not
based on
- <%= column.basis %> surveys
+ <%= column.basis %>
<% elsif column.show_insufficient_data_message? %>
- survey response
- rate below 25%
+ <% column.insufficiency_message.each_with_index do |line, index| %>
+ <% offset = 29 + index * 5 %>
+ <%= line %>
+ <% end %>
<% end %>
diff --git a/spec/presenters/grouped_bar_column_presenter_spec.rb b/spec/presenters/grouped_bar_column_presenter_spec.rb
index efdda151..7083968f 100644
--- a/spec/presenters/grouped_bar_column_presenter_spec.rb
+++ b/spec/presenters/grouped_bar_column_presenter_spec.rb
@@ -184,7 +184,7 @@ describe GroupedBarColumnPresenter do
end
it 'returns a text representation of the type of survey the bars are based on' do
- expect(student_presenter.basis).to eq 'student'
+ expect(student_presenter.basis).to eq 'student surveys'
end
it 'returns only bars that have a numeric score' do