update response_date to recorded_date

This commit is contained in:
rebuilt 2023-05-31 16:57:47 -07:00
parent a30921ce06
commit e3ae12b425
3 changed files with 16 additions and 10 deletions

View file

@ -13,15 +13,15 @@ class SurveyItemValues
dese_id.present?
end
def response_date
@response_date ||= begin
def recorded_date
@recorded_date ||= begin
recorded_date = value_from(pattern: /Recorded\s*Date/i)
Date.parse(recorded_date)
end
end
def academic_year
@academic_year ||= AcademicYear.find_by_date response_date
@academic_year ||= AcademicYear.find_by_date recorded_date
end
def survey_item_response(survey_item:)