from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) import random from django_countries.fields import CountryField class Constants(BaseConstants): name_in_url = 'survey' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): def set_payoff(self): """Calculate payoff, which is zero for the survey""" self.payoff = 0 q_AttCommunity1 = models.PositiveIntegerField( verbose_name=''' I feel connected to the community. Put a scale number 1-5 (1= Strongly agree; 2= Agree; 3= Neither agree nor disagree; 4= Disagree; 5=Strongly Disagree)''' ) q_AttCommunity2 = models.PositiveIntegerField( verbose_name=''' I feel a typical member of the community. Put a scale number 1-5 (1= Strongly agree; 2= Agree; 3= Neither agree nor disagree; 4= Disagree; 5=Strongly Disagree)''' ) q_AttCommunity3 = models.PositiveIntegerField( verbose_name=''' I identify with/response to the community. Put a scale number 1-5 (1= Strongly agree; 2= Agree; 3= Neither agree nor disagree; 4= Disagree; 5=Strongly Disagree)''' ) q_AttMember1 = models.PositiveIntegerField( verbose_name=''' I would like to be friends with the other community members. Put a scale number 1-5 (1= Strongly agree; 2= Agree; 3= Neither agree nor disagree; 4= Disagree; 5=Strongly Disagree)''' ) q_AttMember2 = models.PositiveIntegerField( verbose_name=''' I am interested in learning more about the other members. Put a scale number 1-5 (1= Strongly agree; 2= Agree; 3= Neither agree nor disagree; 4= Disagree; 5=Strongly Disagree)''' ) q_AttMember3 = models.PositiveIntegerField( verbose_name=''' I would like to interact with the other members in the future. Put a scale number 1-5 (1= Strongly agree; 2= Agree; 3= Neither agree nor disagree; 4= Disagree; 5=Strongly Disagree)''' ) q_SociallyAppro = models.PositiveIntegerField( verbose_name=''' For the action contributing to the community, if both you and others' ratings are "Very socially appropriate" on your contirbution, how many points do you think you will contirbute? Put an integer number from 0 to 10 ''') q_SociallyInAppro = models.PositiveIntegerField( verbose_name=''' For the action contributing to the community, if your rating on your contribution is "Very socially appropriate" and your ratings on other members is "Very socially inappropriate", how many points you think you will contirbute? Put an integer number from 0 to 10 ''') q_country = CountryField( verbose_name='What is your country of citizenship?') q_age = models.PositiveIntegerField(verbose_name='What is your age?', choices=range(13, 125), initial=None) q_gender = models.CharField(initial=None, choices=['Male', 'Female'], verbose_name='What is your gender?', widget=widgets.RadioSelect()) q_Ethnicity = models.CharField(initial=None, choices=['African American/Black', 'Asian/Pacific Islander', 'Hispanic/Latino', 'Multiracial', 'Native American/American Indian', 'White', 'Not Listed', 'Prefer not to respond'], verbose_name='Please indicate your race/ethinicity?', widget=widgets.RadioSelect()) q_ClassStatus = models.CharField(initial=None, choices=['Freshman', 'Sophomore', 'Junior', 'Senior', 'Graduate student', 'Professional student', 'Continuing education student'], verbose_name='What is your class status?', widget=widgets.RadioSelect()) q_Major = models.CharField(initial=None, choices=['Accountancy', 'Computer Information Systems', 'Economics', 'Finance', 'Industrial/Organizational Psychology', 'International Business', 'Management', 'Marketing Management', 'Real Estate', 'Statistics and Quantitative Modeling'], verbose_name='What is your major?', widget=widgets.RadioSelect())