mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
working on pilot test
This commit is contained in:
parent
24280f7a68
commit
7ba57be23e
5 changed files with 61 additions and 60 deletions
|
|
@ -12,13 +12,13 @@ namespace :data do
|
|||
|
||||
desc 'Load in category data'
|
||||
task load_categories: :environment do
|
||||
measures = JSON.parse(File.read(File.expand_path('../../../data/measures.json', __FILE__)))
|
||||
measures = JSON.parse(File.read(File.expand_path('../../../data/parent_pilot_measures.json', __FILE__)))
|
||||
measures.each_with_index do |measure, index|
|
||||
category = Category.create(
|
||||
name: measure['title'],
|
||||
blurb: measure['blurb'],
|
||||
description: measure['text'],
|
||||
external_id: index + 1
|
||||
external_id: measure['id'] || index + 1
|
||||
)
|
||||
|
||||
measure['sub'].keys.sort.each do |key|
|
||||
|
|
@ -82,7 +82,7 @@ namespace :data do
|
|||
'Social Studies'
|
||||
]
|
||||
|
||||
questions = JSON.parse(File.read(File.expand_path('../../../data/questions.json', __FILE__)))
|
||||
questions = JSON.parse(File.read(File.expand_path('../../../data/parent_pilot_questions.json', __FILE__)))
|
||||
questions.each do |question|
|
||||
category = nil
|
||||
question['category'].split('-').each do |external_id|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue