mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-09 07:28:41 -07:00
Add scales to framework. Change calculations to first group and then
average those groupings and the way up the framework. Likert scores for a survey_item are averaged. Then all the survey_items in a scale are averaged. Then student scales in a measure are averaged. And teacher scales in a measure are averaged. Then the average of those two calculations becomes the score for a measure. Then the measures in a subcategory are averaged.
This commit is contained in:
parent
1ca88bf6d1
commit
d4df7cbc06
44 changed files with 1053 additions and 856 deletions
10
db/migrate/20220217123648_create_scales.rb
Normal file
10
db/migrate/20220217123648_create_scales.rb
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
class CreateScales < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
create_table :scales do |t|
|
||||
t.string :scale_id, index: { unique: true }, null: false
|
||||
t.references :measure, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
6
db/migrate/20220217164706_add_scale_to_survey_item.rb
Normal file
6
db/migrate/20220217164706_add_scale_to_survey_item.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class AddScaleToSurveyItem < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
add_reference :survey_items, :scale, null: false, foreign_key: true
|
||||
remove_reference :survey_items, :measure, null: false, foreign_key: true
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
class AddScaleToAdminDataItem < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
add_reference :admin_data_items, :scale, null: false, foreign_key: true
|
||||
remove_reference :admin_data_items, :measure
|
||||
add_index :admin_data_items, :admin_data_item_id, unique: true
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue