mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-13 17:30:38 -07:00
Update survey data loader for new student survey responses csv
This commit is contained in:
parent
dcf7ffcb78
commit
a41d5bb4c9
4 changed files with 13622 additions and 3257 deletions
|
|
@ -21,13 +21,13 @@ class SurveyResponsesDataLoader
|
|||
private
|
||||
|
||||
def self.process_row(row:, survey_items:)
|
||||
response_date = Date.parse(row['Recorded Date'])
|
||||
response_date = Date.parse(row['Recorded Date'] || row['RecordedDate'])
|
||||
academic_year = AcademicYear.find_by_date response_date
|
||||
|
||||
response_id = row['Response ID']
|
||||
response_id = row['Response ID'] || row['ResponseId']
|
||||
|
||||
district_code = row['District']
|
||||
school_code = row['School']
|
||||
district_code = row['District'] || row['district']
|
||||
school_code = row['School'] || row['school']
|
||||
return if school_code.nil?
|
||||
|
||||
school = School.find_by_district_code_and_school_code(district_code, school_code)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue