mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
Start adding kindergarten
This commit is contained in:
parent
05ae1cd94b
commit
3a744db975
4 changed files with 36 additions and 5 deletions
32
app/presenters/analyze/graph/column/grade/zero.rb
Normal file
32
app/presenters/analyze/graph/column/grade/zero.rb
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Analyze
|
||||
module Graph
|
||||
module Column
|
||||
module Grade
|
||||
class Zero < GroupedBarColumnPresenter
|
||||
include Analyze::Graph::Column::Grade::ScoreForGrade
|
||||
def label
|
||||
'Kindergarten'
|
||||
end
|
||||
|
||||
def basis
|
||||
'student'
|
||||
end
|
||||
|
||||
def show_irrelevancy_message?
|
||||
false
|
||||
end
|
||||
|
||||
def show_insufficient_data_message?
|
||||
false
|
||||
end
|
||||
|
||||
def grade
|
||||
1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -32,6 +32,7 @@ module Analyze
|
|||
end
|
||||
|
||||
CFR = {
|
||||
0 => Zero,
|
||||
1 => One,
|
||||
2 => Two,
|
||||
3 => Three,
|
||||
|
|
@ -43,7 +44,7 @@ module Analyze
|
|||
9 => Nine,
|
||||
10 => Ten,
|
||||
11 => Eleven,
|
||||
12 => Twelve,
|
||||
12 => Twelve
|
||||
}.freeze
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -61,10 +61,7 @@ class SurveyItemValues
|
|||
end
|
||||
|
||||
def grade
|
||||
@grade ||= begin
|
||||
raw_grade = (row['grade'] || row['Grade'] || row['What grade are you in?']).to_i
|
||||
raw_grade == 0 ? nil : raw_grade
|
||||
end
|
||||
@grade ||= raw_grade = (row['grade'] || row['Grade'] || row['What grade are you in?']).to_i
|
||||
end
|
||||
|
||||
def gender
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ namespace :data do
|
|||
|
||||
desc 'load students for lowell'
|
||||
task load_students_for_lowell: :environment do
|
||||
student_count = Student.count
|
||||
SurveyItemResponse.update_all(student_id: nil)
|
||||
StudentRace.delete_all
|
||||
Student.delete_all
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue