from os import environ def create_session_config(treatment, num_demo_participants=2): return dict( name=f'ai_and_team_{treatment}', display_name=f'AI and team ({treatment})', app_sequence=[ 'intro', 'examples', 'practice', 'task_group', 'end', 'dropout', ], num_demo_participants=num_demo_participants, prolific_completion_url="https://app.prolific.com/submissions/complete?cc=C83NQPO3", lab_completion_url="http://www.msblab.org/panels/controls.php?id=${e://Field/id}&surveyId=${e://Field/surveyId}", debug=True, treatment=treatment, ) SESSION_CONFIGS = [ create_session_config('CG', 2), create_session_config('T2', 2), create_session_config('T2E', 2), create_session_config('S1', 1), dict( name='ai_and_team', display_name='AI and team', app_sequence=[ 'intro', 'examples', 'practice', 'task_group', 'end', 'dropout', ], num_demo_participants=6, prolific_completion_url="https://app.prolific.com/submissions/complete?cc=C83NQPO3", lab_completion_url="http://www.msblab.org/panels/controls.php?id=${e://Field/id}&surveyId=${e://Field/surveyId}", # Optional: force treatment for quick tests (practice + task_group). E.g. 'S1', 'T2E'. # When set, assignment rotation in practice is skipped; participant.vars['is_single'] follows S1. # treatment='S1', debug=True, # use_browser_bots=True, ) ] # if you set a property in SESSION_CONFIG_DEFAULTS, it will be inherited by all configs # in SESSION_CONFIGS, except those that explicitly override it. # the session config can be accessed from methods in your apps as self.session.config, # e.g. self.session.config['participation_fee'] SESSION_CONFIG_DEFAULTS = dict( real_world_currency_per_point=1.00, participation_fee=0.0, doc="" ) ROOMS = [ dict( name='GU_lab_INSEAD', display_name='GU_lab_INSEAD', ) ] PARTICIPANT_FIELDS = [ 'netID', # 'consent', # Lab version doesn't need consent 'treatment', 'task_avg_error', 'task_predicted_scores', 'task_total_error', 'task_payoff', 'is_dropout', 'is_teammate_dropout', 'warning_count', # How many times the user has been warned 'last_check_time', 'wait_page_arrival_time', # Time when the user arrived at the wait page 'waiting_too_long', # Whether the user has been waiting too long 'finished' ] SESSION_FIELDS = [ 'practice_order', 'task_order', ] # ISO-639 code # for example: de, fr, ja, ko, zh-hans LANGUAGE_CODE = 'en' # e.g. EUR, GBP, CNY, JPY REAL_WORLD_CURRENCY_CODE = 'USD' USE_POINTS = False DEBUG = False ADMIN_USERNAME = 'admin' # for security, best to set admin password in an environment variable ADMIN_PASSWORD = environ.get('OTREE_ADMIN_PASSWORD') DEMO_PAGE_INTRO_HTML = """ """ SECRET_KEY = '6497192993418'