mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 13:38:18 -08:00
30 lines
616 B
Ruby
30 lines
616 B
Ruby
# frozen_string_literal: true
|
|
|
|
class StudentSurveyPresenter < 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
|
|
'Student survey'
|
|
end
|
|
|
|
def id
|
|
"student-survey-items-#{@measure_id}"
|
|
end
|
|
|
|
def item_descriptions
|
|
@survey_items.map(&:prompt)
|
|
end
|
|
|
|
def reason_for_insufficiency
|
|
'low response rate'
|
|
end
|
|
|
|
def descriptions_and_availability
|
|
survey_items.map(&:description)
|
|
end
|
|
end
|