class StudentAssessmentImporter
  WHITELIST = Regexp.union(/ACCESS/, /WIDA-ACCESS/, /DIBELS/, /MCAS/, /MAP/, /MELA-O/, /MEPA/, /STAR/).freeze

  def remote_file_name
    # Expects a CSV with the following headers, transformed to symbols by CsvTransformer during import:
    #
    # [ "state_id", "local_id", "school_local_id", "assessment_date",
    #   "assessment_scale_score", "assessment_performance_level", "assessment_growth",
    #   "assessment_name", "assessment_subject", "assessment_test" ]

    'assessment_export.txt'
  end

  def data_transformer
    CsvTransformer.new
  end

  def import_row(row)
    return unless row[:assessment_test].match(WHITELIST)
    StudentAssessmentRow.build(row).save!
  end

end

class StudentAssessmentImporter
  WHITELIST = Regexp.union(/ACCESS/, /WIDA-ACCESS/, /DIBELS/, /MCAS/, /MAP/, /MELA-O/, /MEPA/).freeze

  def remote_file_name
    # Expects a CSV with the following headers, transformed to symbols by CsvTransformer during import:
    #
    # [ "state_id", "local_id", "school_local_id", "assessment_date",
    #   "assessment_scale_score", "assessment_performance_level", "assessment_growth",
    #   "assessment_name", "assessment_subject", "assessment_test" ]

    'assessment_export.txt'
  end

  def data_transformer
    CsvTransformer.new
  end

  def import_row(row)
    return unless row[:assessment_test].match(WHITELIST)
    StudentAssessmentRow.build(row).save!
  end

end

Stop importing STAR data from X2
Stop importing STAR data from X2

+ The STAR SFTP server is the only source of truth about STAR
+ One system was importing results with subject "Math" (STAR SFTP), the other with subject "Mathematics" (Aspen X2)
+ Only import assessment results from one system (STAR SFTP), use the same subject name as Aspen X2 ("Mathematics")
+ #75
