Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Missouri course offerings #24143

Merged
merged 1 commit into from
Aug 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions dashboard/app/models/census/state_cs_offering.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Census::StateCsOffering < ApplicationRecord
LA
MA
MI
MO
MS
NC
NY
Expand Down Expand Up @@ -95,6 +96,8 @@ def self.construct_state_school_id(state_code, row_hash)
row_hash['State_School_ID']
when 'MA'
School.construct_state_school_id('MA', row_hash['District Code'][0..3], row_hash['School Code'])
when 'MO'
row_hash['STATE_SCHOOL_ID']
when 'MS'
School.find_by(id: row_hash['NCES School ID'])&.state_school_id
when 'MI'
Expand Down Expand Up @@ -294,6 +297,14 @@ def self.construct_state_school_id(state_code, row_hash)
10197
).freeze

MO_COURSE_CODES = %w(
034355
991105
100415
991195
991196
).freeze

MS_COURSE_CODES = %w(
561005
000283
Expand Down Expand Up @@ -440,6 +451,8 @@ def self.get_courses(state_code, row_hash)
end
when 'MI'
MI_COURSE_CODES.select {|course| course == row_hash['Subject Course Code']}
when 'MO'
MO_COURSE_CODES.select {|course| course == row_hash['COURSE']}
when 'MS'
MS_COURSE_CODES.select {|course| course == row_hash['Course ID']}
when 'NC'
Expand Down