From 002725893ab58d73a82da9427fa72bcd37f2ba2e Mon Sep 17 00:00:00 2001 From: Dave Eargle Date: Wed, 8 Feb 2017 16:55:03 -0500 Subject: [PATCH] passing allow_repeats to the adserver --- psiturk/psiturk_shell.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/psiturk/psiturk_shell.py b/psiturk/psiturk_shell.py index 6dfd6c277..3e0690164 100644 --- a/psiturk/psiturk_shell.py +++ b/psiturk/psiturk_shell.py @@ -1132,6 +1132,12 @@ def create_psiturk_ad(self): else: ip_address = str(self.web_services.get_my_ip()) port = str(self.config.get('Server Parameters', 'port')) + + if self.config.has_option('HIT Configuration', 'allow_repeats'): + allow_repeats = self.config.getboolean('HIT Configuration', 'allow_repeats') + else: + allow_repeats = False + ad_content = { 'psiturk_external': True, 'server': ip_address, @@ -1144,7 +1150,8 @@ def create_psiturk_ad(self): 'experiment_name': str(self.config.get('HIT Configuration', 'title')), 'contact_email_on_error': str(self.config.get('HIT Configuration', 'contact_email_on_error')), 'ad_group': str(self.config.get('HIT Configuration', 'ad_group')), - 'keywords': str(self.config.get('HIT Configuration', 'psiturk_keywords')) + 'keywords': str(self.config.get('HIT Configuration', 'psiturk_keywords')), + 'allow_repeats': int(allow_repeats) } ad_id = self.web_services.create_ad(ad_content) return ad_id