#bla from otree.api import * author = 'Jan Peters' doc = """ Your app description """ def create_big_seven_question(label): return models.IntegerField( # blank = True, choices = [ [1, ""], [2, ""], [3, ""], [4, ""], [5, ""], [6, ""], [7, ""], ], label = label, widget = widgets.RadioSelectHorizontal, ) class Constants(BaseConstants): name_in_url = 'die_roll' players_per_group = None num_rounds = 1 endowment = 4 class Group(BaseGroup): pass class Player(BasePlayer): treatment_group = models.IntegerField( initial = 1, ) actual_roll = models.StringField( initial='0', blank = True, ) reported_roll = models.IntegerField( initial=None, choices = [1,2,3,4,5,6], label='My die outcome is:', ) charity = models.StringField( initial=None, blank=True, choices = [ "Ärtze ohne Grenzen", "Brot für die Welt", "Bund Naturschutz", "Deutsches Rotes Kreuz", "Deutscher Tierschutzbund", "Kindernothilfe", "SOS-Kinderdörfer", "Welthungerhilfe", ], label = "Please select a charity to which the amount determined by your reported die outcome should be donated. Please note that we actually donate all the money generated within this experiment to the charities.", ) donation_amount = models.FloatField( initial=None, label="What amount (in euros) do you donate annually to charitable organisations?", min=0, ) #Post-questionaire q1 = create_big_seven_question("I am a benevolent person.") q2 = create_big_seven_question("I am an empathetic person.") q3 = create_big_seven_question("I am a caring person.") q4 = create_big_seven_question("I am an honest person.") q5 = create_big_seven_question("I am a person who tells the truth.") q6 = create_big_seven_question("I am a deceptive person.") q7 = create_big_seven_question("I am a good person.") q8 = create_big_seven_question("... remorse.") q9 = create_big_seven_question("... guilt.") q10 = create_big_seven_question("... regret.") q11 = create_big_seven_question("To what extent do you think your selected charity in study 2 is helping people in need?") q12 = create_big_seven_question("To what extent are you motivated to raise money for your selected charity in study 2?") q13 = create_big_seven_question("To what extent do you think it is important to you that your selected charity in study 2 receives a donation from this study?") q14 = create_big_seven_question("To what extent is it personal to you that your selected charity in study 2 receives a donation from this study?") q15 = create_big_seven_question("To what extend do you agree that at least one of the charities that were available to choose from in study 2 supports a worthwhile cause?") q16 = create_big_seven_question("To what extent is it likely that you would donate to the charity you chose in study 2 outside of the experiment?") q17 = create_big_seven_question("To what extent do you believe it is justifiable to report a higher-than-actual die outcome?") q18 = create_big_seven_question("To what extent do you believe it is unethical to report a higher-than-actual die outcome?") q19 = create_big_seven_question("To what extent do you believe it is morally acceptable to report a higher-than-actual die outcome?") q20 = create_big_seven_question("To what extent do you believe it is wrong to report a higher-than-actual die outcome?") q21 = create_big_seven_question("He/she will think that the participant is a benevolent person.") q22 = create_big_seven_question("He/she will think that the participant is an empathetic person.") q23 = create_big_seven_question("He/she will think that the participant is a caring person.") q24 = create_big_seven_question("He/she will think that the participant is an honest person.") q25 = create_big_seven_question("He/she will think that the participant is a person who tells the truth.") q26 = create_big_seven_question("He/she will think that the participant is a deceptive person.") q27 = create_big_seven_question("Moral") q28 = create_big_seven_question("Praiseworthy") q29 = create_big_seven_question("Blameworthy") q30 = create_big_seven_question("Outrageous") q31 = create_big_seven_question("Acceptable") q32 = create_big_seven_question("If an action could harm another individual, then it should not be done, irrespective of the benefits to be gained.") q33 = create_big_seven_question("Moral standards should be seen as being individualistic; what one person considers to be moral may be judged to be immoral by another person.") q34 = create_big_seven_question("Whether a lie is judged to be moral or immoral depends upon the circumstances surrounding the action.") q35 = create_big_seven_question("… that one should not sacrifice, no matter what the (material or other) benefits.") q36 = create_big_seven_question("… for which I think it is right to make a cost-benefit analysis.") q37 = create_big_seven_question("… that cannot be measured in monetary terms.") q38 = create_big_seven_question("… about which I can be flexible if the situation demands it.") class Subsession(BaseSubsession): def creating_session(self): import itertools donations = itertools.cycle([0, 10, 50, 90, 100]) for player in self.get_players(): player.treatment_group = next(donations)