update response_date to recorded_date

This commit is contained in:
rebuilt 2023-05-31 16:57:47 -07:00
parent d031179dc0
commit f749b96006
3 changed files with 14 additions and 9 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:)