import random from otree.api import * from settings import LANGUAGE_CODE if LANGUAGE_CODE == 'id': from .lexicon_de import Lexicon else: from .lexicon_en import Lexicon author = 'Alistair Munro, Fitawhidan Nashuha, and Gerald Ezra Charles' doc = """ Pre-Game Survey and Consent """ which_language = {'en': False, 'id': False} # noqa which_language[LANGUAGE_CODE] = True #### Start of the settings class C(BaseConstants): NAME_IN_URL = 'a_survey' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): age_18 = models.BooleanField( choices=[ [True, 'Yes, I am 18 years old or older'], [False, 'No, I am younger than 18 years old'], ], label='Are you 18 or older?', widget=widgets.RadioSelect, ) consent_q = models.BooleanField( choices=[ [True, 'I agree to participate in the study'], [False, 'I do not agree to participate'], ], label='Consent to participate', widget=widgets.RadioSelect, ) name = models.StringField( label='Your Name' ) age = models.IntegerField( min=13, max=125, label='What is your age?', ) gender = models.StringField( choices=['Male', 'Female', 'Prefer not to say'], label='What is your gender?', widget=widgets.RadioSelect, ) phone_number = models.StringField( label='

Your phone number (WhatsApp reachable)

' 'Make sure it is active and can be contacted via WhatsApp (WA). ' 'And Make sure it match with the one you provided for the other session. ' 'We will not be able to pay you without a contactable phone number.
' '(Acceptable phone numbers are those started with \'+62\', \'62\', or \'08\')', max_length=20, min_length=8, ) # phone_number_confirmation = models.StringField university = models.StringField( choices=[ 'Universitas Indonesia', 'IPB University', 'Padjajaran University', 'Brawijaya University', 'Bandung Institute of Technology', 'Universitas Pakuan', 'Universitas Gunadarma', 'Universitas Negeri Jakarta', 'Politeknik Negeri Jakarta', 'Universitas Pancasila', 'Universitas Ibn Khaldun', 'other', ], label='Name of Your university', ) lainnya_x = models.StringField( label='

Please state your university

' '(Leave it blank if your university is available in the options)', blank=True, ) field_study = models.StringField( choices=[ 'Science and Technology', 'Social and Humanities', 'Health', 'Education', 'Art and Design', 'Others' ], label='Your field of study', ) faculty = models.StringField( label='

Name of Your faculty

' '(Full name of your faculty. Please do not use abbreviation)', ) family_phone= models.StringField( label='

A family member\'s phone number (WhatsApp reachable)

' 'Make sure it is active and can be contacted via WhatsApp (WA). ', max_length = 20, min_length = 8, ) family_relation=models.StringField( label='

Relationship with the family member', choices=[['Mother', 'My Mother'], ['Father', 'My Father'], ['Uncle', 'My Uncle'], ['Aunt', 'My Aunt'], ['Your Guardian', 'Your Guardian'], ['Brother', 'My Brother'], ['Sister', 'My Sister'], ['Other', 'Other'] ] ) friend_phone = models.StringField( label='

Your closest friend\'s phone number (WhatsApp reachable)

' 'Make sure it is active and can be contacted via WhatsApp (WA). ' 'Choose any friend with whom you are in regular contact!', max_length=20, min_length=8, ) gender_friend = models.StringField( label = 'Your friend\'s gender.', choices = [['Male', 'Male'], ['Female', 'Female'], ], widget=widgets.RadioSelect ) Activity_School = models.StringField( label=( '

' 'Are you currently enrolled in a school, college, or university?' '

' ), choices=[ ['Yes', 'Yes, I am still in school/college/university'], ['No', 'No, I am currently not enrolled in a school/college/university'], ], widget=widgets.RadioSelect ) Activity_Main = models.StringField( label='

Which is the main activity that took the most of your time?' '

', choices=[['Work', 'Work'], ['School', 'School/College/University'], ['Household', 'Taking care of the Household'], ['Nothing', 'Not doing any activities'], ], widget=widgets.RadioSelect ) ## Consent consent_failed = models.BooleanField(initial=False) ## Consent 2 Withdrawal Rights Consent_Withdrawal_Right = models.BooleanField( choices=[[True, 'I understand and consent.'], [False, 'I do not consent'], ], label=' You have the right to withdraw at any time by closing the window/tab.
' 'Your participation is voluntary, without any risk or penalty for not joining the study.
', widget=widgets.RadioSelect ) #### Consent 3 Anon_Confid_Anon1 = models.BooleanField( choices=[[True, 'I understand and consent'], [False, 'I do not consent'], ], label='

For payment and contacting you about the second session, ' 'we will ask for your private phone number (contactable via WhatsApp).

' '(It will not be shared with external parties)', widget=widgets.RadioSelect ) Anon_Confid_Anon2 = models.BooleanField( choices=[[True, 'I understand and consent'], [False, 'I do not consent'], ], label='

For our study purposes, we will ask for your one of your friends and one of your family members\' ' 'private phone number (contactable via WhatsApp).

' '(It will not be shared with external parties)', widget=widgets.RadioSelect ) # ' '