Commit 7448e45589398f6174781a2b9c6abc280d4ba2f5

Authored by Luke Baker
1 parent eb973b57

add session identifier to ideas csv

this allows us to get the info parameter if available for the user who
submitted the idea
Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
app/models/question.rb
... ... @@ -562,7 +562,7 @@ class Question < ActiveRecord::Base
562 562  
563 563 when 'ideas'
564 564 outfile = "ideamarketplace_#{self.id}_ideas"
565   - 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']
  565 + 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']
566 566 when 'non_votes'
567 567 outfile = "ideamarketplace_#{self.id}_non_votes"
568 568 headers = ['Record Type', 'Record 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']
... ... @@ -602,7 +602,7 @@ class Question < ActiveRecord::Base
602 602  
603 603 num_skips = self.skips.count(:conditions => {:prompt_id => left_prompts_ids + right_prompts_ids})
604 604  
605   - csv << [c.question_id, c.id, c.data.strip, c.wins, c.losses, num_skips, c.score, user_submitted , c.creator_id, c.created_at, c.updated_at, active, left_appearances, right_appearances]
  605 + csv << [c.question_id, c.id, c.data.strip, c.wins, c.losses, num_skips, c.score, user_submitted , c.creator_id, c.created_at, c.updated_at, active, left_appearances, right_appearances, c.creator.identifier]
606 606  
607 607 end
608 608 when 'non_votes'
... ...