from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, ) author = 'Magnus Strobel' doc = """ Questionnaire """ def create_big_five_question(label): return models.IntegerField( choices=[ [1, ""], [2, ""], [3, ""], [4, ""], [5, ""], ], label=label, widget=widgets.RadioSelect, ) class Constants(BaseConstants): name_in_url = 'questionnaire' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): gender = models.StringField( choices=["Male", "Female", "Non-binary"], label="What is your gender?", widget=widgets.RadioSelect ) birth_year = models.IntegerField( label="In which year were you born?", choices=[ 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001, 2000, 1999, 1998, 1997, 1996, 1995, 1994, 1993, 1992, 1991, 1990, 1989, 1988, 1987, 1986, 1985, 1984, 1983, 1982, 1981, 1980, 1979, 1978, 1977, 1976, 1975, 1974, 1973, 1972, 1971, 1970, 1969, 1968, 1967, 1966, 1965, 1964, 1963, 1962, 1961, 1960, 1959, 1958, 1957, 1956, 1955, 1954, 1953, 1952, 1951, 1950, 1949, 1948, 1947, 1946, 1945, 1944, 1943, 1943, 1942, 1941, 1940, 1939, 1938, 1937, 1936, 1935, 1934, 1933, 1932, 1931, 1930, 1929, 1928, 1927, 1926, 1925, 1924, 1923, 1922, 1921, 1920, 1919, 1918, 1917, 1916, 1915, 1914, 1913, 1912, 1911, 1910, 1909, 1908, 1907, 1906, 1905, 1904, 1903, 1902, 1901, 1900, ] ) ethnic_group = models.StringField( label="Please indicate your ethnic group", choices=["White", "Black African", "Coloured", "Indian", "Prefer not to say"] ) nationality = models.StringField( choices=["Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bhutan", "Bolivia (Plurinational State of)", "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cabo Verde", "Cambodia", "Cameroon", "Canada", "Central African Republic", "Chad", "Chile", "China", "Colombia", "Comoros", "Congo", "Costa Rica", "Côte D'Ivoire", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Democratic People's Republic of Korea", "Democratic Republic of the Congo", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Fiji", "Finland", "France", "Gabon", "Gambia (Republic of The)", "Georgia", "Germany", "Ghana", "Greece", "Grenada", "Guatemala", "Guinea", "Guinea Bissau", "Guyana", "Haiti", "Honduras", "Hungary", "Iceland", "India", "Indonesia", "Iran (Islamic Republic of)", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Kuwait", "Kyrgyzstan", "Lao People’s Democratic Republic", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Mauritania", "Mauritius", "Mexico", "Micronesia (Federated States of)", "Monaco", "Mongolia", "Montenegro", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", "Qatar", "Republic of Korea", "Republic of Moldova", "Romania", "Russian Federation", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Serbia", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Sudan", "Spain", "Sri Lanka", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syrian Arab Republic", "Tajikistan", "Thailand", "The former Yugoslav Republic of Macedonia", "Timor-Leste", "Togo", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom of Great Britain and Northern Ireland", "United Republic of Tanzania", "United States of America", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela, Bolivarian Republic of", "Viet Nam", "Yemen", "Zambia", "Zimbabwe"], label="Please indicate your nationality", ) native_language = models.StringField( choices=["Zulu", "Xhosa", "Afrikaans", "English", "Northern Sotho", "Tswana", "Sesotho", "Tsonga", "Swati", "Venda", "Ndebele", "Other" ], label="What is your home language?" ) education = models.StringField( choices=[ "Less than matric", "Matric", "Certificate or diploma", "Bachelor's degree", "Master's degree", "Doctorate" ], label="Please indicate your highest level of education completed" ) occupation = models.TextField( label="What is your current occupation?", choices=["Student", "Manager", "Professional (Science, health, education, business, technology, legal, social and cultural)", "Technicians (Science, health, education, business, technology, legal, social and cultural)", "Clerical support workers ", "Service, sales and armed forces (Personal care, sales, protective services and armed force workers)", "Craft and related trades workers", "Plant and machine operators and assemblers", "Agricultural, forestry and fishery labourers (farmers and farm workers)", "Cleaners and helpers", "Labourers in mining, construction, manufacturing and transport", "Other occupation" ] ) income = models.StringField( choices=["R0 – R 4 999", "R5000 – R 14 999", "≥ R15 000"], label="Please indicate your monthly income after tax?", widget=widgets.RadioSelect ) children_1 = models.StringField( choices=["Yes", "No"], label="Do you have children of your own under the age of 8 years?", widget=widgets.RadioSelect ) children_2 = models.StringField( choices=["Yes", "No"], label="Do you have children of your own between 8 and 18 years old?", widget=widgets.RadioSelect ) household_size = models.StringField( label="Please indicate the number of people living in your household or student house?", choices=["Living alone", "2", "3", "4", "5", ">5" ] ) township = models.StringField( label="Which township or suburban area you currently living in?", ) student_housing = models.StringField( blank=True, label="If student are you living in a ...", choices=["University residence ", "Private accommodation (single)", "Private accommodation (sharing)" ], widget=widgets.RadioSelect ) # Section 2 food_buyer = models.StringField( choices=["Yes", "No"], label="Are you the main food buyer in your household?", widget=widgets.RadioSelect ) ready_to_eat_food = models.StringField( label="Which type of ready-to-eat food items do you purchase most often? You can select more than one.", choices=[], widget=widgets.RadioSelect, blank=True ) ready_to_eat_food_meat = models.BooleanField( label="Meat products (e.g. viennas)", widget=widgets.CheckboxInput, blank=True ) ready_to_eat_food_dairy = models.BooleanField( label="Dairy products (e.g. cheese)", widget=widgets.CheckboxInput, blank=True ) ready_to_eat_food_fruit = models.BooleanField( label="Fruit and vegetable products (e.g. salads)", widget=widgets.CheckboxInput, blank=True ) ready_to_eat_food_baked = models.BooleanField( label="Baked products (Sandwiches)", widget=widgets.CheckboxInput, blank=True ) ready_to_eat_food_none = models.BooleanField( label="None of the above", widget=widgets.CheckboxInput, blank=True ) ready_to_eat_meat = models.StringField( label="How often do you buy and consume ready-to-eat meat products?", choices=["Never", "1–2 times per week", "1–2 times per month", "1–2 times per year" ] ) ready_to_eat_meat_product = models.StringField( label="Which ready-to-eat meat product do you buy often? You can select more than one.", choices=[], widget=widgets.RadioSelect, blank=True ) ready_to_eat_meat_product_polony = models.BooleanField( label="‘Polony’", widget=widgets.CheckboxInput, blank=True ) ready_to_eat_meat_product_viennas = models.BooleanField( label="‘Viennas’", widget=widgets.CheckboxInput, blank=True ) ready_to_eat_meat_product_sausages = models.BooleanField( label="Sausages", widget=widgets.CheckboxInput, blank=True ) ready_to_eat_meat_product_bacon = models.BooleanField( label="Bacon", widget=widgets.CheckboxInput, blank=True ) ready_to_eat_meat_product_ham = models.BooleanField( label="Ham", widget=widgets.CheckboxInput, blank=True ) ready_to_eat_meat_product_consumption = models.StringField( choices=["Personal consumption", "Consumption by other household members"], label="Are the ready-to-eat meat products purchased for personal consumption or mostly for consumption by " "other household members such as children, spouse or housemates?", widget=widgets.RadioSelect ) ready_to_eat_meat_importance = models.StringField( label="In declining order of importance please indicate why you purchase ready-to-eat meat products. Rank each " "element from 1 (very important) to 5 (least important).", choices=[], widget=widgets.RadioSelect, blank=True ) ready_to_eat_meat_importance_taste = models.IntegerField(label="Taste", min=1, max=5) ready_to_eat_meat_importance_convenience = models.IntegerField(label="Convenience", min=1, max=5) ready_to_eat_meat_importance_quality = models.IntegerField(label="Nutritional quality", min=1, max=5) ready_to_eat_meat_importance_cost = models.IntegerField(label="Cost", min=1, max=5) ready_to_eat_meat_importance_safe = models.IntegerField(label="Safe for consumption", min=1, max=5) # Section 3 q_31 = create_big_five_question( "When purchasing ready-to-eat (RTE) meat products, I do take the safety of the product into account.") q_32 = create_big_five_question( "Eating expired RTE meat products in good physical condition does carry a health risk") q_33 = create_big_five_question( "Raw meat products if cooked properly are much safer relative to processed meat products") q_34 = create_big_five_question( "The preservation techniques and packaging of processed meat products makes them less susceptible to sickness " "pathogens") q_35 = create_big_five_question("Some RTE meat products are safer to consume than others.") q_36 = create_big_five_question("RTE meat products in my view are of poor quality") # Section 4 q_41 = create_big_five_question("In my view all RTE meat products are of poor quality") q_42 = create_big_five_question("The quality of RTE meat products differ substantially between brands") q_43 = create_big_five_question( "The quality of RTE meat products differ substantially between different retail stores") q_44 = create_big_five_question("I eat RTE meat products out of necessity, not choice") q_45 = create_big_five_question("Eating RTE meat products is healthy") # Section 5 listeria_aware = models.StringField( label="Were you aware of the past Listeria outbreak in South Africa?", choices=["Yes", "No"], widget=widgets.RadioSelect ) product = models.StringField( label="Which product was implicated?", choices=["‘Polony’", "‘Viennas’", "Sausages", "Bacon", "Ham", "Do not know" ] ) outbreak_year = models.StringField( label="In which year(s) did the outbreak occur?", choices=["2015-2016", "2017-2018", "2016-2017", "2018-2019", "Do not know" ] ) outbreak_cases_deaths = models.StringField( label="How many cases and deaths were confirmed due to the outbreak?", choices=["~ 687 reported cases and 180 deaths", "~ 1060 reported cases and more than 200 deaths", "~ 840 reported cases and more than 100 deaths", "Do not know"] ) lowest_cases = models.StringField( label="Which province had the lowest number of confirmed cases of the Listeria outbreak?", choices=["KwaZulu Natal Province", "Northern Cape Province", "Gauteng Province", "Western Cape Province", "North – West Province", "None of the above", "Do not know"] ) change_in_purchasing_behaviour = models.StringField( label="Did the Listeria outbreak change your purchasing behaviour of ready-to-eat meat products?", choices=["Yes", "No", "I don't know"], widget=widgets.RadioSelect ) change_in_purchasing_behaviour_before_after = models.StringField( label="Did your purchasing behaviour change before or after the product recall?", choices=["Before", "After", "I don't know"], widget=widgets.RadioSelect ) change_before_reason = models.LongStringField( label="If before the recall briefly explain why?", blank=True ) victim = models.StringField( label="Are you a victim of the Listeria outbreak, in other words, did you fall sick as a result of consuming " "contaminated food?", choices=["Yes", "No"], widget=widgets.RadioSelect ) foodborne_illness = models.StringField( label="Before the Listeria outbreak, have you ever fallen ill to a foodborne illness caused by a pathogen " "other than Listeria?", choices=["Yes", "No"], widget=widgets.RadioSelect ) family_friends_relatives_foodborne = models.StringField( label="Did any of your family members, close friends and relatives fall ill to the Listeria pathogen or any " "other food borne pathogen?", choices=["Yes", "No"], widget=widgets.RadioSelect ) # Section 6 meat_safe_70 = models.StringField( label="All ready-to-eat (RTE) meat products such as bacon and “viennas” are safe for consumption if cooked " "above 70 degrees Celsius?", choices=["Strongly disagree", "Disagree", "Neutral", "Agree", "Strongly agree"] ) still_buy_product = models.StringField( label="Do you still buy the product that was implicated during the Listeria outbreak?", choices=["Yes", "No", "Sometimes but not as frequently"], widget=widgets.RadioSelect ) stop_buying_outbreak = models.StringField( label="During the outbreak, did you stop buying the implicated product of the specific brand or did you " "entirely stop for all similar products irrespective of the brand?", choices=["Stopped purchasing in a specific brand but continued consuming the product from a different brand.", "Stopped purchasing all the similar products including the implicated products.", "Did not stop buying the implicated products and similar products."], widget=widgets.RadioSelect ) poultry = models.StringField( label="If the implicated RTE meat product that was recalled during the South African Listeria outbreak was a " "poultry product not a beef product. Would you have ...", choices=["Stopped purchasing poultry RTE products but continued consuming beef RTE products.", "Stopped eating all the RTE meat products irrespective whether poultry or beef.", "Stopped eating only the implicated poultry RTE product and continued consuming poultry RTE products " "and beef RTE products which were not implicated during the outbreak."], widget=widgets.RadioSelect ) q_611 = create_big_five_question("‘Polony’") q_612 = create_big_five_question("‘Viennas’") q_613 = create_big_five_question("Sausages ") q_614 = create_big_five_question("Bacon") q_615 = create_big_five_question("Ham") q_621 = create_big_five_question("Suppose that RTE meat products are processed and sold on the farm") q_622 = create_big_five_question("Suppose that RTE meat products are processed by well-known producers or big producers and sold in local food supermarkets.") lethal_pathogen_change = models.StringField( label="Suppose you become aware of the outbreak of a lethal pathogen in some ready-to-eat meat products " "produced in a neighbouring country of South Africa. Would it change your purchasing behaviour of South " "African RTE meat products?", choices=["Yes", "No"], widget=widgets.RadioSelect ) # Section 7 q_71 = create_big_five_question( "I worry about what other people will think of me even when I know it doesn't make any difference.") q_72 = create_big_five_question("It bothers me when people form an unfavourable impression of me.") q_73 = create_big_five_question("I am frequently afraid of other people noticing my shortcomings.") q_74 = create_big_five_question("I worry about what kind of impression I make on people.") q_75 = create_big_five_question("I am afraid that others will not approve of me.") q_76 = create_big_five_question("I am concerned about other people's opinions of me.") q_77 = create_big_five_question("When I am talking to someone, I worry about what they may be thinking about me.") q_78 = create_big_five_question("I am usually worried about what kind of impression I make.") q_79 = create_big_five_question("If I know someone is judging me, it tends to bother me.") q_710 = create_big_five_question("Sometimes I think I am too concerned with what other people think of me.") q_711 = create_big_five_question("I often worry that I will say or do wrong things.") q_712 = create_big_five_question( "I worry about what other people will think of me even when I know it doesn’t make any difference.")