From f7780433c7ac7cf8926a78fec9ec48430259f365 Mon Sep 17 00:00:00 2001 From: Nelson Jovel Date: Fri, 19 Jul 2024 11:21:32 -0700 Subject: [PATCH] fix: correctly reference SurveyItemResponse instead of Report::SurveyItemResponse --- app/models/report/survey_item.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/report/survey_item.rb b/app/models/report/survey_item.rb index 22b0f7a2..32c32bef 100644 --- a/app/models/report/survey_item.rb +++ b/app/models/report/survey_item.rb @@ -8,7 +8,7 @@ module Report school.grades(academic_year:).each do |grade| sufficient_survey_items[grade] ||= Set.new end - SurveyItemResponse.student_survey_items_with_responses_by_grade( + ::SurveyItemResponse.student_survey_items_with_responses_by_grade( school:, academic_year: ).select do |key, _value| @@ -93,7 +93,7 @@ module Report # Convert they keys in this hash to a hash where the key is the grade # and the value is a set of sufficient survey IDs survey_ids_to_grades = {} - SurveyItemResponse.student_survey_items_with_responses_by_grade( + ::SurveyItemResponse.student_survey_items_with_responses_by_grade( school:, academic_year: ).select do |key, _value| @@ -159,7 +159,7 @@ module Report data << row end # Next up is teacher data - SurveyItemResponse.teacher_survey_items_with_sufficient_responses(school:, academic_year:).keys.each do |key| # each key is a survey item id + ::SurveyItemResponse.teacher_survey_items_with_sufficient_responses(school:, academic_year:).keys.each do |key| # each key is a survey item id row = [] survey_item = ::SurveyItem.find_by_id(key) row.concat(survey_item_info(survey_item:))