Create grouped bar chart on analyze page

This commit is contained in:
Nelson Jovel 2022-05-20 20:24:23 -07:00
parent d7b0fe0e36
commit 7a9830915b
20 changed files with 204 additions and 4 deletions

View file

@ -135,7 +135,6 @@ class Measure < ActiveRecord::Base
averages << student_survey_items.first.send(name) if includes_student_survey_items?
averages << teacher_survey_items.first.send(name) if includes_teacher_survey_items?
(averages << admin_data_items.map(&name)).flatten! if includes_admin_data_items?
averages.average
end
end

View file

@ -7,7 +7,7 @@ class SurveyItemResponse < ActiveRecord::Base
belongs_to :survey_item
scope :exclude_boston, lambda {
boston = District.where(name: 'Boston').first
boston = District.find_by_name('Boston')
where.not(school: boston.schools) if boston.present?
}
end