Sha256: 5cc8f28145784a8a2ed4eb2d65a7a59fa267fcb8b7f863967c73bd215b1d3b7a

Contents?: true

Size: 640 Bytes

Versions: 16

Compression:

Stored size: 640 Bytes

Contents

$: << File.join(File.dirname(__FILE__), '..', 'lib')
require 'rubygems'
require '../lib/rturk'
require 'yaml'

aws = YAML.load(File.open(File.join(File.dirname(__FILE__), 'mturk.yml')))
RTurk::setup(aws['AWSAccessKeyId'], aws['AWSAccessKey'])
file = File.open(File.join(File.dirname(__FILE__), 'answers.yml'), 'w')

hits = RTurk::Hit.all_reviewable

puts "#{hits.size} reviewable hits. \n"

unless hits.empty?
  puts "Reviewing all assignments"
  
  hits.each do |hit|
    hit.assignments.each do |assignment|
      file.puts assignment.answers.to_hash.to_yaml
      assignment.approve! if assignment.status == 'Submitted'
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rturk-2.3.6 examples/review_answer.rb
rturk-2.3.5 examples/review_answer.rb
rturk-2.3.4 examples/review_answer.rb
rturk-2.3.3 examples/review_answer.rb
rturk-2.3.2 examples/review_answer.rb
rturk-2.3.1 examples/review_answer.rb
rturk-2.3.0 examples/review_answer.rb
rturk-2.2.1 examples/review_answer.rb
rturk-2.2.0 examples/review_answer.rb
rturk-2.1.1 examples/review_answer.rb
rturk-2.1.0 examples/review_answer.rb
rturk-2.0.5 examples/review_answer.rb
rturk-2.0.4 examples/review_answer.rb
rturk-2.0.3 examples/review_answer.rb
rturk-2.0.2 examples/review_answer.rb
rturk-2.0.1 examples/review_answer.rb