From 8d885b66122462d9a514f5b46bcc45f4666a05e6 Mon Sep 17 00:00:00 2001 From: Jared Cosulich Date: Thu, 26 Jul 2018 10:32:25 -0400 Subject: [PATCH] run teacher import first --- lib/tasks/data.rake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/tasks/data.rake b/lib/tasks/data.rake index 3f3aa2a6..fc1a1a4a 100644 --- a/lib/tasks/data.rake +++ b/lib/tasks/data.rake @@ -154,7 +154,8 @@ namespace :data do option4: question['R4'], option5: question['R5'], for_recipient_students: question['Level'] == "Students", - external_id: question['qid'] + external_id: question['qid'], + reverse: question['reverse'] == "1" ) else variations.each do |variation| @@ -166,7 +167,8 @@ namespace :data do option4: question['R4'], option5: question['R5'], for_recipient_students: question['Level'] == "Students", - external_id: question['qid'] + external_id: question['qid'], + reverse: question['reverse'] == "1" ) end end @@ -202,7 +204,7 @@ namespace :data do startTime = Time.new # ['student_responses'].each do |file| - ['student_responses', 'teacher_responses'].each do |file| + ['teacher_responses', 'student_responses'].each do |file| recipients = file.split('_')[0] target_group = Question.target_groups["for_#{recipients}s"] csv_string = File.read(File.expand_path("../../../data/#{file}_#{@year}.csv", __FILE__))