from otree.api import * c = cu doc = '' class C(BaseConstants): NAME_IN_URL = 'Post_survey' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): check1 = models.BooleanField(choices=[[True, 'True'], [False, 'False']], label='I was situated in a different situation in every round in Part 2. Please circle your answer. ') check2 = models.IntegerField(choices=[[1, 'Strongly disagree'], [2, 'Disagree'], [3, 'Somewhat disagree'], [4, 'Neutral'], [5, 'Somewhat agree'], [6, 'Agree'], [7, 'Strongly agree']], label='The various situations presented to me drive me to make different decision-making. Please circle the extent of your agreement to the statement. ', widget=widgets.RadioSelectHorizontal) reasons = models.LongStringField(label='What were the reasons for your decision? If you choose a different decision for each round. Please state your reasons for choosing each decision.') age = models.IntegerField(label='What is your age', max=125, min=18) gender = models.StringField(choices=[['Male', 'Male'], ['Female', 'Female'], ['Non-binary', 'Non-binary'], ['Prefer not so say', 'Prefer not so say']], label='What is your gender') job = models.StringField(choices=[['Employed full-time', 'Employed full-time'], ['Employed part-time', 'Employed part-time'], ['Unemployed (currently looking for work)', 'Unemployed (currently looking for work)'], ['Unemployed (NOT looking for work)', 'Unemployed (NOT looking for work)'], ['Student', 'Student'], ['Self employed', 'Self employed'], ['Retired', 'Retired'], ['Prefer not to say', 'Prefer not to say']], label='What is your current employment status?') work_experience = models.IntegerField(label='How many years of relevant work experience do you have? If you have none or this question is not applicable to you, answer 0. ', max=60, min=0) religion = models.StringField(choices=[['None', 'None'], ['Buddhist', 'Buddhist'], ['Christian (including Catholic, Protestant and all other Christian denominations)', 'Christian (including Catholic, Protestant and all other Christian denominations)'], ['Hindu', 'Hindu'], ['Islam', 'Islam'], ['Jewish', 'Jewish'], ['Other', 'Other'], ['Prefer not to say', 'Prefer not to say']], label='What is your religion?') nationality = models.StringField(choices=[['Afghan', 'Afghan'], ['Albanian', 'Albanian'], ['Algerian', 'Algerian'], ['American', 'American'], ['Andorran', 'Andorran'], ['Angolan', 'Angolan'], ['Anguillan', 'Anguillan'], ['Citizen of Antigua and Barbuda', 'Citizen of Antigua and Barbuda'], ['Argentine', 'Argentine'], ['Armenian', 'Armenian'], ['Australian', 'Australian'], ['Austrian', 'Austrian'], ['Azerbaijani', 'Azerbaijani'], ['Bahamian', 'Bahamian'], ['Bahraini', 'Bahraini'], ['Bangladeshi', 'Bangladeshi'], ['Barbadian', 'Barbadian'], ['Belarusian', 'Belarusian'], ['Belgian', 'Belgian'], ['Belizean', 'Belizean'], ['Beninese', 'Beninese'], ['Bermudian', 'Bermudian'], ['Bhutanese', 'Bhutanese'], ['Bolivian', 'Bolivian'], ['Citizen of Bosnia and Herzegovina', 'Citizen of Bosnia and Herzegovina'], ['Botswanan', 'Botswanan'], ['Brazilian', 'Brazilian'], ['British', 'British'], ['British Virgin Islander', 'British Virgin Islander'], ['Bruneian', 'Bruneian'], ['Bulgarian', 'Bulgarian'], ['Burkinan', 'Burkinan'], ['Burmese', 'Burmese'], ['Burundian', 'Burundian'], ['Cambodian', 'Cambodian'], ['Cameroonian', 'Cameroonian'], ['Canadian', 'Canadian'], ['Cape Verdean', 'Cape Verdean'], ['Cayman Islander', 'Cayman Islander'], ['Central African', 'Central African'], ['Chadian', 'Chadian'], ['Chilean', 'Chilean'], ['Chinese', 'Chinese'], ['Colombian', 'Colombian'], ['Comoran', 'Comoran'], ['Congolese (Congo)', 'Congolese (Congo)'], ['Congolese (DRC)', 'Congolese (DRC)'], ['Cook Islander', 'Cook Islander'], ['Costa Rican', 'Costa Rican'], ['Croatian', 'Croatian'], ['Cuban', 'Cuban'], ['Cymraes', 'Cymraes'], ['Cymro', 'Cymro'], ['Cypriot', 'Cypriot'], ['Czech', 'Czech'], ['Danish', 'Danish'], ['Djiboutian', 'Djiboutian'], ['Dominican', 'Dominican'], ['Citizen of the Dominican Republic', 'Citizen of the Dominican Republic'], ['Dutch', 'Dutch'], ['East Timorese', 'East Timorese'], ['Ecuadorean', 'Ecuadorean'], ['Egyptian', 'Egyptian'], ['Emirati', 'Emirati'], ['English', 'English'], ['Equatorial Guinean', 'Equatorial Guinean'], ['Eritrean', 'Eritrean'], ['Estonian', 'Estonian'], ['Ethiopian', 'Ethiopian'], ['Faroese', 'Faroese'], ['Fijian', 'Fijian'], ['Filipino', 'Filipino'], ['Finnish', 'Finnish'], ['French', 'French'], ['Gabonese', 'Gabonese'], ['Gambian', 'Gambian'], ['Georgian', 'Georgian'], ['German', 'German'], ['Ghanaian', 'Ghanaian'], ['Gibraltarian', 'Gibraltarian'], ['Greek', 'Greek'], ['Greenlandic', 'Greenlandic'], ['Grenadian', 'Grenadian'], ['Guamanian', 'Guamanian'], ['Guatemalan', 'Guatemalan'], ['Citizen of Guinea-Bissau', 'Citizen of Guinea-Bissau'], ['Guinean', 'Guinean'], ['Guyanese', 'Guyanese'], ['Haitian', 'Haitian'], ['Honduran', 'Honduran'], ['Hong Konger', 'Hong Konger'], ['Hungarian', 'Hungarian'], ['Icelandic', 'Icelandic'], ['Indian', 'Indian'], ['Indonesian', 'Indonesian'], ['Iranian', 'Iranian'], ['Iraqi', 'Iraqi'], ['Irish', 'Irish'], ['Israeli', 'Israeli'], ['Italian', 'Italian'], ['Ivorian', 'Ivorian'], ['Jamaican', 'Jamaican'], ['Japanese', 'Japanese'], ['Jordanian', 'Jordanian'], ['Kazakh', 'Kazakh'], ['Kenyan', 'Kenyan'], ['Kittitian', 'Kittitian'], ['Citizen of Kiribati', 'Citizen of Kiribati'], ['Kosovan', 'Kosovan'], ['Kuwaiti', 'Kuwaiti'], ['Kyrgyz', 'Kyrgyz'], ['Lao', 'Lao'], ['Latvian', 'Latvian'], ['Lebanese', 'Lebanese'], ['Liberian', 'Liberian'], ['Libyan', 'Libyan'], ['Liechtenstein citizen', 'Liechtenstein citizen'], ['Lithuanian', 'Lithuanian'], ['Luxembourger', 'Luxembourger'], ['Macanese', 'Macanese'], ['Macedonian', 'Macedonian'], ['Malagasy', 'Malagasy'], ['Malawian', 'Malawian'], ['Malaysian', 'Malaysian'], ['Maldivian', 'Maldivian'], ['Malian', 'Malian'], ['Maltese', 'Maltese'], ['Marshallese', 'Marshallese'], ['Martiniquais', 'Martiniquais'], ['Mauritanian', 'Mauritanian'], ['Mauritian', 'Mauritian'], ['Mexican', 'Mexican'], ['Micronesian', 'Micronesian'], ['Moldovan', 'Moldovan'], ['Monegasque', 'Monegasque'], ['Mongolian', 'Mongolian'], ['Montenegrin', 'Montenegrin'], ['Montserratian', 'Montserratian'], ['Moroccan', 'Moroccan'], ['Mosotho', 'Mosotho'], ['Mozambican', 'Mozambican'], ['Namibian', 'Namibian'], ['Nauruan', 'Nauruan'], ['Nepalese', 'Nepalese'], ['New Zealander', 'New Zealander'], ['Nicaraguan', 'Nicaraguan'], ['Nigerian', 'Nigerian'], ['Nigerien', 'Nigerien'], ['Niuean', 'Niuean'], ['North Korean', 'North Korean'], ['Northern Irish', 'Northern Irish'], ['Norwegian', 'Norwegian'], ['Omani', 'Omani'], ['Pakistani', 'Pakistani'], ['Palauan', 'Palauan'], ['Palestinian', 'Palestinian'], ['Panamanian', 'Panamanian'], ['Papua New Guinean', 'Papua New Guinean'], ['Paraguayan', 'Paraguayan'], ['Peruvian', 'Peruvian'], ['Pitcairn Islander', 'Pitcairn Islander'], ['Polish', 'Polish'], ['Portuguese', 'Portuguese'], ['Prydeinig', 'Prydeinig'], ['Puerto Rican', 'Puerto Rican'], ['Qatari', 'Qatari'], ['Romanian', 'Romanian'], ['Russian', 'Russian'], ['Rwandan', 'Rwandan'], ['Salvadorean', 'Salvadorean'], ['Sammarinese', 'Sammarinese'], ['Samoan', 'Samoan'], ['Sao Tomean', 'Sao Tomean'], ['Saudi Arabian', 'Saudi Arabian'], ['Scottish', 'Scottish'], ['Senegalese', 'Senegalese'], ['Serbian', 'Serbian'], ['Citizen of Seychelles', 'Citizen of Seychelles'], ['Sierra Leonean', 'Sierra Leonean'], ['Singaporean', 'Singaporean'], ['Slovak', 'Slovak'], ['Slovenian', 'Slovenian'], ['Solomon Islander', 'Solomon Islander'], ['Somali', 'Somali'], ['South African', 'South African'], ['South Korean', 'South Korean'], ['South Sudanese', 'South Sudanese'], ['Spanish', 'Spanish'], ['Sri Lankan', 'Sri Lankan'], ['St Helenian', 'St Helenian'], ['St Lucian', 'St Lucian'], ['Sudanese', 'Sudanese'], ['Surinamese', 'Surinamese'], ['Swazi', 'Swazi'], ['Swedish', 'Swedish'], ['Swiss', 'Swiss'], ['Syrian', 'Syrian'], ['Taiwanese', 'Taiwanese'], ['Tajik', 'Tajik'], ['Tanzanian', 'Tanzanian'], ['Thai', 'Thai'], ['Togolese', 'Togolese'], ['Tongan', 'Tongan'], ['Trinidadian', 'Trinidadian'], ['Tristanian', 'Tristanian'], ['Tunisian', 'Tunisian'], ['Turkish', 'Turkish'], ['Turkmen', 'Turkmen'], ['Turks and Caicos Islander', 'Turks and Caicos Islander'], ['Tuvaluan', 'Tuvaluan'], ['Ugandan', 'Ugandan'], ['Ukrainian', 'Ukrainian'], ['Uruguayan', 'Uruguayan'], ['Uzbek', 'Uzbek'], ['Vatican citizen', 'Vatican citizen'], ['Citizen of Vanuatu', 'Citizen of Vanuatu'], ['Venezuelan', 'Venezuelan'], ['Vietnamese', 'Vietnamese'], ['Vincentian', 'Vincentian'], ['Wallisian', 'Wallisian'], ['Welsh', 'Welsh'], ['Yemeni', 'Yemeni'], ['Zambian', 'Zambian'], ['Zimbabwean', 'Zimbabwean'], ['Prefer not to say', 'Prefer not to say']], label='What is your nationality?') other_country = models.IntegerField(choices=[[1, 'Yes'], [2, 'No']], label='Have you ever lived in a country other than the one of your origin?') time_spent_other_country = models.IntegerField(label='Please state your time spent in other countries (in months), excluding holiday purpose. If this question is not applicable to you, answer 0. ', min=0) def custom_export(players): yield ['participant_code', 'id_in_group', 'payment'] for p in players: pp = p.participant yield [pp.code, p.id_in_group, pp.payment] class Demographics(Page): form_model = 'player' form_fields = ['check1', 'check2', 'reasons', 'nationality', 'other_country', 'time_spent_other_country', 'gender', 'age', 'job', 'work_experience', 'religion'] class Payment(Page): form_model = 'player' @staticmethod def vars_for_template(player: Player): participant = player.participant return dict(payoff = player.participant.payoff_plus_participation_fee()) page_sequence = [Demographics, Payment]