mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-10 07:50:33 -07:00
feat: if admin data value is above 5, round down to 5
This commit is contained in:
parent
b7494988d7
commit
5c7729beeb
5 changed files with 62 additions and 41 deletions
|
|
@ -7,7 +7,6 @@ class AdminDataLoader
|
|||
admin_data_values = []
|
||||
CSV.parse(File.read(filepath), headers: true) do |row|
|
||||
score = likert_score(row:)
|
||||
byebug
|
||||
unless valid_likert_score(likert_score: score)
|
||||
puts "Invalid score: #{score}
|
||||
for school: #{School.find_by_dese_id(row['DESE ID']).name}
|
||||
|
|
@ -58,7 +57,6 @@ class AdminDataLoader
|
|||
admin_data_value = AdminDataValue.find_or_initialize_by(school: School.find_by_dese_id(dese_id(row:).to_i),
|
||||
academic_year: AcademicYear.find_by_range(ay(row:)),
|
||||
admin_data_item: AdminDataItem.find_by_admin_data_item_id(admin_data_item(row:)))
|
||||
byebug
|
||||
return nil if admin_data_value.likert_score == score
|
||||
|
||||
admin_data_value.likert_score = score
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue