Skip to content

Commit

Permalink
Merge pull request #24143 from code-dot-org/import-missouri-course-of…
Browse files Browse the repository at this point in the history
…ferings

Import Missouri course offerings
  • Loading branch information
sureshc committed Aug 7, 2018
2 parents 65b5461 + 5921389 commit 7fb9337
Showing 1 changed file with 13 additions and 0 deletions.
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

0 comments on commit 7fb9337

Please sign in to comment.