dirty commit: can't get references to work correctly between any tables

This commit is contained in:
Nelson Jovel 2024-01-04 19:36:10 -08:00
parent e1f0b78236
commit a4fddbeced
183 changed files with 5461 additions and 5 deletions

View file

@ -0,0 +1,35 @@
# frozen_string_literal: true
module Dashboard
class TeacherSurveyPresenter < DataItemPresenter
attr_reader :survey_items
def initialize(measure_id:, survey_items:, has_sufficient_data:, school:, academic_year:)
super(measure_id:, has_sufficient_data:, school:, academic_year:)
@survey_items = survey_items
end
def title
"Teacher survey"
end
def id
"teacher-survey-items-#{@measure_id}"
end
def reason_for_insufficiency
"low response rate"
end
def descriptions_and_availability
if @measure_id == "1B-i"
return [Summary.new("1B-i", "Items available upon request to ECP",
true)]
end
survey_items.map do |survey_item|
Summary.new(survey_item.survey_item_id, survey_item.prompt, true)
end
end
end
end