mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
Update demographics table with lanugage options Create a lanugage table to hold the new languages Update the demographic loader to input languages into the database Update the cleaner to read the language column Update the parent table to hold a reference to a language Update the data uploader script to read the language from the csv and update the language information for any parent items that already exist (or create database entries if none already exist) update the analyze interface to add controls for selecting ‘parents by group’ and a dropdown for ‘parent by language’ Update the analyze controller to read the parent-by-group parameter Create a graph for the parent-by-group view Bubble up averages for language calculations. Make sure n-size only counts responses for a given measure.
27 lines
889 B
Ruby
27 lines
889 B
Ruby
class Sped < ApplicationRecord
|
|
scope :by_designation, -> { all.map { |sped| [sped.designation, sped] }.to_h }
|
|
|
|
include FriendlyId
|
|
|
|
friendly_id :designation, use: [:slugged]
|
|
def self.to_designation(sped)
|
|
return "Not Special Education" if sped.blank?
|
|
|
|
case sped
|
|
in /active|^A$|1|^Special\s*Education$/i
|
|
"Special Education"
|
|
in /^I$|exited|0|^Not\s*Special\s*Education$|Does\s*not\s*apply|Referred|Ineligible|^No\s*special\s*needs$|Not\s*SPED/i
|
|
"Not Special Education"
|
|
in %r{^#*N/*A$|^Unknown|^SpecialEdStatus|^SPED}i
|
|
"Unknown"
|
|
else
|
|
puts "************************************"
|
|
puts "******** ERROR **********"
|
|
puts ""
|
|
puts "Error parsing Special Education column. '#{sped}' is not a known value. Halting execution"
|
|
puts ""
|
|
puts "************************************"
|
|
exit
|
|
end
|
|
end
|
|
end
|