Commit 823f8d0dfad0c3ea67e2dcdb8221ffe94b9eca5a

Authored by Luke Baker
1 parent fc2bd81d

fix order of skip columns

Showing 1 changed file with 4 additions and 4 deletions   Show diff stats
app/models/question.rb
@@ -574,14 +574,14 @@ class Question < ActiveRecord::Base @@ -574,14 +574,14 @@ class Question < ActiveRecord::Base
574 when 'votes' 574 when 'votes'
575 outfile = "ideamarketplace_#{self.id}_votes" 575 outfile = "ideamarketplace_#{self.id}_votes"
576 576
577 - headers = ['Vote ID', 'Session ID', 'Ideamarketplace ID','Winner ID', 'Winner Text', 'Loser ID', 'Loser Text', 'Prompt ID', 'Appearance ID', 'Left Choice ID', 'Right Choice ID', 'Created at', 'Updated at', 'Response Time (s)', 'Missing Response Time Explanation', 'Session Identifier', 'Valid'] 577 + headers = ['Vote ID', 'Session ID', 'Wikisurvey ID','Winner ID', 'Winner Text', 'Loser ID', 'Loser Text', 'Prompt ID', 'Appearance ID', 'Left Choice ID', 'Right Choice ID', 'Created at', 'Updated at', 'Response Time (s)', 'Missing Response Time Explanation', 'Session Identifier', 'Valid']
578 578
579 when 'ideas' 579 when 'ideas'
580 outfile = "ideamarketplace_#{self.id}_ideas" 580 outfile = "ideamarketplace_#{self.id}_ideas"
581 - headers = ['Ideamarketplace ID','Idea ID', 'Idea Text', 'Wins', 'Losses', 'Times involved in Cant Decide', 'Score', 'User Submitted', 'Session ID', 'Created at', 'Last Activity', 'Active', 'Appearances on Left', 'Appearances on Right', 'Session Identifier'] 581 + headers = ['Wikisurvey ID','Idea ID', 'Idea Text', 'Wins', 'Losses', 'Times involved in Cant Decide', 'Score', 'User Submitted', 'Session ID', 'Created at', 'Last Activity', 'Active', 'Appearances on Left', 'Appearances on Right', 'Session Identifier']
582 when 'non_votes' 582 when 'non_votes'
583 outfile = "ideamarketplace_#{self.id}_non_votes" 583 outfile = "ideamarketplace_#{self.id}_non_votes"
584 - headers = ['Record Type', 'Skip ID', 'Appearance ID', 'Session ID', 'Ideamarketplace ID','Left Choice ID', 'Left Choice Text', 'Right Choice ID', 'Right Choice Text', 'Prompt ID', 'Reason', 'Created at', 'Updated at', 'Response Time (s)', 'Missing Response Time Explanation', 'Session Identifier', 'Valid'] 584 + headers = ['Record Type', 'Skip ID', 'Appearance ID', 'Session ID', 'Wikisurvey ID','Left Choice ID', 'Left Choice Text', 'Right Choice ID', 'Right Choice Text', 'Prompt ID', 'Reason', 'Created at', 'Updated at', 'Response Time (s)', 'Missing Response Time Explanation', 'Session Identifier', 'Valid']
585 else 585 else
586 raise "Unsupported export type: #{type}" 586 raise "Unsupported export type: #{type}"
587 end 587 end
@@ -632,7 +632,7 @@ class Question < ActiveRecord::Base @@ -632,7 +632,7 @@ class Question < ActiveRecord::Base
632 valid = s.valid_record ? 'TRUE' : 'FALSE' 632 valid = s.valid_record ? 'TRUE' : 'FALSE'
633 time_viewed = s.time_viewed.nil? ? "NA": s.time_viewed.to_f / 1000.0 633 time_viewed = s.time_viewed.nil? ? "NA": s.time_viewed.to_f / 1000.0
634 prompt = s.prompt 634 prompt = s.prompt
635 - csv << [ "Skip", s.id, s.skipper_id, a.id, s.question_id, s.prompt.left_choice.id, s.prompt.left_choice.data.strip, s.prompt.right_choice.id, s.prompt.right_choice.data.strip, s.prompt_id, s.skip_reason, s.created_at, s.updated_at, time_viewed , s.missing_response_time_exp, s.skipper.identifier,valid] 635 + csv << [ "Skip", s.id, a.id, s.skipper_id, s.question_id, s.prompt.left_choice.id, s.prompt.left_choice.data.strip, s.prompt.right_choice.id, s.prompt.right_choice.data.strip, s.prompt_id, s.skip_reason, s.created_at, s.updated_at, time_viewed , s.missing_response_time_exp, s.skipper.identifier,valid]
636 636
637 else 637 else
638 # If no skip and no vote, this is an orphaned appearance 638 # If no skip and no vote, this is an orphaned appearance