app/importers/rows/access_row.rb
# Represents a row in a CSV export from Somerville's Aspen X2 student information system.
Represents a row in a CSV export from Somerville's Aspen X2 student information system.
Represents a row in a CSV export from Somerville ' s Aspen X2 student information system .
def build
    assessment_id = find_assessment_id
    return nil if assessment_id.nil?
    date_taken = PerDistrict.new.parse_date_during_import(row[:assessment_date])
    return nil if date_taken.nil?
    student_assessment = StudentAssessment.find_or_initialize_by(
      student_id: student_id,
      assessment_id: assessment_id,
      date_taken: date_taken
    )
    student_assessment.assign_attributes(
      scale_score: row[:assessment_scale_score],
      performance_level: row[:assessment_performance_level],
      growth_percentile: row[:assessment_growth]
    )
    student_assessment
  end
def build assessment_id = find_assessment_id return nil if assessment_id . nil? date_taken = PerDistrict . new . parse_date_during_import ( row [ :assessment_date ] ) return nil if date_taken . nil? student_assessment = StudentAssessment . find_or_initialize_by ( student_id : student_id , assessment_id : assessment_id , date_taken : date_taken ) student_assessment . assign_attributes ( scale_score : row [ :assessment_scale_score ] , performance_level : row [ :assessment_performance_level ] , growth_percentile : row [ :assessment_growth ] ) student_assessment end
Represents a row in a CSV export from Somerville's Aspen X2 student information system.
Represents a row in a CSV export from Somerville ' s Aspen X2 student information system .