from otree.api import * class C(BaseConstants): NAME_IN_URL = 'survey' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): # age = models.IntegerField(label='What is your age?', min=13, max=125) age = models.IntegerField(label='¿Cuál es tu edad?', min=13, max=125) gender = models.StringField( # choices=[['Male', 'Male'], ['Female', 'Female']], choices=[['Masculino', 'Masculino'], ['Femenino', 'Femenino'], ['Otro', 'Otro']], # label='What is your gender?', label='Sexo', widget=widgets.RadioSelectHorizontal, ) education = models.StringField( choices=['Enseñanza Primaria', 'Graduado Escolar', 'Bachillerato', 'Formación Profesional', 'Grado universitario', 'Master', 'Doctorado'], label='¿Cuál es tu nivel de estudios actualmente (incluso si estás cursando)?', ) dominancia = models.StringField( choices=[['Derecha', 'Derecha'], ['Izquierda', 'Izquierda']], # label='What is your gender?', label='Dominancia manual', widget=widgets.RadioSelectHorizontal, ) crt_bat = models.IntegerField( # label=''' # A bat and a ball cost 22 dollars in total. # The bat costs 20 dollars more than the ball. # How many dollars does the ball cost?''' label=''' Un bate y una pelota cuestan en total 22 dólares. El bate cuesta 20 dólares más que la pelota. ¿Cuántos dólares cuesta la pelota?''' ) crt_widget = models.IntegerField( # label=''' # If it takes 5 machines 5 minutes to make 5 widgets, # how many minutes would it take 100 machines to make 100 widgets? # ''' label=''' Si a 5 máquinas les lleva 5 minutos hacer 5 juguetes, ¿cuántos minutos les llevaría a 100 máquinas hacer 100 juguetes? ''' ) crt_lake = models.IntegerField( # label=''' # In a lake, there is a patch of lily pads. # Every day, the patch doubles in size. # If it takes 48 days for the patch to cover the entire lake, # how many days would it take for the patch to cover half of the lake? # ''' label=''' En un lago, hay un parche de nenúfares. Cada día, el parche se duplica de tamaño. Si tarda 48 días en cubrir todo el lago, ¿cuántos días tardaría en cubrir la mitad del lago? ''' ) crt_elves = models.IntegerField( # label=''' # If three elves can wrap three toys in one hour, how many elves are needed to wrap six toys in 2 hours? # ''' label=''' Si tres duendes pueden envolver tres juguetes en una hora, ¿cuántos duendes se necesitan para envolver seis juguetes en dos horas? ''' ) crt_jerry = models.IntegerField( # label=''' # Jerry received both the 15th highest and the 15th lowest mark in the class. How many students are there # in the class? # ''' label=''' Jerry recibió la decimoquinta nota más alta y la decimoquinta más baja de la clase. ¿Cuántos estudiantes hay en la clase? ''' ) crt_athletics = models.IntegerField( # label=''' # In an athletics team, tall members are three times more likely to win a medal than short members. # This year the team has won 60 medals so far. How many of these have been won by short athletes? # ''' label=''' En un equipo de atletismo la probabilidad de ganar una medalla es tres veces mayor en los miembros altos que en los bajos. Este año, el equipo ha ganado 60 medallas hasta ahora. ¿Cuántas de ellas han sido ganadas por atletas bajos? ''' ) # FUNCTIONS # PAGES class Welcome(Page): pass class Demographics(Page): form_model = 'player' form_fields = ['age', 'gender', 'education', 'dominancia'] class CognitiveReflectionTest(Page): form_model = 'player' form_fields = ['crt_bat', 'crt_widget', 'crt_lake', 'crt_elves', 'crt_jerry', 'crt_athletics'] page_sequence = [Welcome, Demographics, CognitiveReflectionTest]