import random from otree.api import * author = 'Santiago Neira Hernández' doc = """ Third Party Punisher 0 """ class Constants(BaseConstants): name_in_url = 'third_party_null' players_per_group = 3 num_rounds = 5 instructionsInicio = 'third_party_null/instructionsInicio.html' instructionsGeneralA = 'third_party_null/instructionsGeneralA.html' instructionsGeneralB = 'third_party_null/instructionsGeneralB.html' instructionsGeneralC = 'third_party_null/instructionsGeneralC.html' instructionsEspA = 'third_party_null/InstructionsEspecificA.html' instructionsEspB = 'third_party_null/InstructionsEspecificB.html' instructionsEspC = 'third_party_null/InstructionsEspecificC.html' etapaUnoA = 'third_party_null/EtapaUnoA.html' etapaUnoB = 'third_party_null/EtapaUnoB.html' etapaUnoC = 'third_party_null/EtapaUnoC.html' introGenA = 'third_party_null/instructionsGeneralA.html' introGenB = 'third_party_null/instructionsGeneralB.html' introGenC = 'third_party_null/instructionsGeneralC.html' introEspA = 'third_party_null/instructionsEspecificA.html' introEspB = 'third_party_null/instructionsEspecificB.html' introEspC = 'third_party_null/instructionsEspecificC.html' collapsed = 'third_party_null/collapseinstructions.html' PcProdA = 'third_party_null/PcProcedureA.html' PcProdB = 'third_party_null/PcProcedureB.html' PcProdC = 'third_party_null/PcProcedureC.html' endowmentA = cu(100) endowmentC = cu(50) class Subsession(BaseSubsession): pass class Group(BaseGroup): sent_amount = models.CurrencyField(choices=[0, 10, 20, 30, 40, 50]) expectation_sent = models.CurrencyField( label="¿Cuántos puntos cree que el participante A le dará a usted?", choices=[0, 10, 20, 30, 40, 50], ) expectation_social_norm_s1_B = models.IntegerField( label="", choices=[ [0, "Muy socialmente inapropiada"], [1, "Algo socialmente inapropiada"], [2, "Algo socialmente apropiada"], [3, "Muy socialmente apropiada"], ], widget=widgets.RadioSelect, ) expectation_social_norm_s1_C = models.IntegerField( label="", choices=[ [0, "Muy socialmente inapropiada"], [1, "Algo socialmente inapropiada"], [2, "Algo socialmente apropiada"], [3, "Muy socialmente apropiada"], ], widget=widgets.RadioSelect, ) class Player(BasePlayer): survey_4 = models.IntegerField(initial=0) survey_5 = models.IntegerField(initial=0) survey_6 = models.IntegerField(initial=0) survey_8 = models.IntegerField(initial=0) random_round = models.IntegerField() city = models.StringField() day = models.IntegerField(min=1, max=31) month = models.IntegerField(min=1, max=12) year = models.IntegerField(max=2022, min=2022, default=2022) hour = models.IntegerField(min=1, max=12) minutes = models.IntegerField(min=0, max=59) ampm = models.IntegerField(choices=[[0, 'AM'], [1, 'PM']]) name = models.StringField() signature = models.StringField() idcard = models.StringField() citycard = models.StringField() q1 = models.IntegerField(label="") q2 = models.IntegerField( choices=[[0, "Masculino"], [1, "Femenino"]], widget=widgets.RadioSelect ) q3 = models.IntegerField(label="") q4 = models.StringField(label="") q5 = models.IntegerField( choices=[ [0, "Pregrado"], [1, "Posgrado"], ], widget=widgets.RadioSelect, ) q6 = models.IntegerField(label="") q7 = models.IntegerField(choices=[[0, "Sí"], [1, "No"]], widget=widgets.RadioSelect) q8 = models.IntegerField(choices=[[0, "Sí"], [1, "No"]], widget=widgets.RadioSelect) q9 = models.IntegerField(min=0, max=100) q10 = models.IntegerField(label="") q11 = models.IntegerField( choices=[ [0, "0"], [1, "1"], [2, "2"], [3, "3"], [4, "4"], [5, "5"], [6, "6"], [7, "7"], [8, "8"], [9, "9"], [10, "10"], ], widget=widgets.RadioSelectHorizontal, ) q12 = models.IntegerField( choices=[ [0, "0"], [1, "1"], [2, "2"], [3, "3"], [4, "4"], [5, "5"], [6, "6"], [7, "7"], [8, "8"], [9, "9"], [10, "10"], ], widget=widgets.RadioSelectHorizontal, ) q13 = models.IntegerField( choices=[ [0, "0"], [1, "1"], [2, "2"], [3, "3"], [4, "4"], [5, "5"], [6, "6"], [7, "7"], [8, "8"], [9, "9"], [10, "10"], ], widget=widgets.RadioSelectHorizontal, ) q14 = models.IntegerField( choices=[ [0, "0"], [1, "1"], [2, "2"], [3, "3"], [4, "4"], [5, "5"], [6, "6"], [7, "7"], [8, "8"], [9, "9"], [10, "10"], ], widget=widgets.RadioSelectHorizontal, ) q15 = models.IntegerField( choices=[ [0, "1"], [1, "2"], [2, "3"], [3, "4"], [4, "5"], [5, "6"], [6, "No sabe/No Responde"], ], widget=widgets.RadioSelect, ) ##Field del pago de la ronda sin coordinación. round_payoff = models.CurrencyField() ##Fields con respecto al los puntos enviados por A a B. bel_sent = models.BooleanField(initial=False) expected_sent_ammount_B = models.CurrencyField(initial=None) global_payoff = models.CurrencyField(initial=None) # **** PAYMENT **** ##Fields for payment idcard1 = models.StringField() expday = models.IntegerField(min=1, max=31) expmonth = models.IntegerField(min=1, max=12) expyear = models.StringField() namep = models.StringField() depto = models.StringField() cityp = models.StringField() country1 = models.StringField() email = models.StringField() telephone = models.StringField() dayp = models.IntegerField(min=1, max=31) monthp = models.IntegerField(min=1, max=12) yearp = models.IntegerField(max=2022, min=2022, default=2022) concept = models.StringField() signaturep = models.StringField() idcard2 = models.StringField() cedula = models.StringField() typepayment = models.BooleanField(choices=[ [True, "Transferencia Bancaria"], [False, "Daviplata"], ], widget=widgets.RadioSelectHorizontal, ) platform = models.IntegerField(choices=[ [1, "Daviplata"], ], widget=widgets.RadioSelectHorizontal, initial=None) telephone_2 = models.StringField(initial=None) bank = models.IntegerField(choices=[ [0, "AV Villas"], [1, "Bancamía"], [2, "Banco Agrario"], [3, "Banco Bancoldex"], [4, "Banco Compartir"], [5, "Banco Coopcentral"], [6, "Banco Falabella"], [7, "Banco Finandina"], [8, "Banco Mundo Mujer"], [9, "Banco Pichincha"], [10, "Banco Procredit Colombia"], [11, "Banco Santander Colombia"], [12, "Banco Serfinanza"], [13, "Banco W"], [14, "Bancolombia"], [15, "Bancoomeva"], [16, "BBVA"], [17, "BNB Paribas"], [18, "Bogotá"], [19, "Caja Social"], [20, "CitiBank"], [21, "Coltefinanciera"], [22, "Compañía Financiera Juriscoop"], [23, "Confiar"], [24, "Cooperativa financiera Contrafa"], [25, "Cooperativa financiera de Antioquia"], [26, "Davivienda"], [27, "ITAU"], [28, "ITAU antes Corpbanca"], [29, "Occidente"], [30, "Popular"], [31, "Scotiabank Colpatria"], ], initial=None) id_bank = models.StringField(initial=None) name_2 = models.StringField(initial=None) account_type = models.BooleanField( choices=[ [True, "Ahorros"], [False, "Corriente"], ], initial=None ) idcard3 = models.StringField(initial=None) ## Address fields dir1 = models.IntegerField( choices=[ [0, "Avenida Calle"], [1, "Avenida Carrera"], [2, "Autopista"], [3, "Avenida"], [4, "Carretera"], [5, "Calle"], [6, "Camino"], [7, "Carrera"], [8, "Circunvalar"], [9, "Diagonal"], [10, "Kilometro"], [11, "Transversal"], [12, "Vereda"], [13, "Variante"], [14, "Zona Franca"] ], blank=True ) dir2 = models.IntegerField(min=1, blank=True) dir3 = models.IntegerField( choices=[ [1, "A"], [2, "B"], [3, "C"], [4, "D"], [5, "E"], [6, "F"], [7, "G"], [8, "H"], [9, "I"], [10, "J"], [11, "K"], [12, "L"], [13, "M"], [14, "N"], [15, "O"], [16, "P"], [17, "Q"], [18, "R"], [19, "S"], [20, "T"], [21, "U"], [22, "V"], [23, "W"], [24, "X"], [25, "Y"], [26, "Z"] ], blank=True ) dir4 = models.IntegerField( choices=[ [1, "Bis"], [2, "Este"], [3, "Noreste"], [4, "Noroeste"], [5, "Oeste"], [6, "Sur"], [7, "Sureste"], [8, "Suroeste"] ], blank=True ) dir5 = models.IntegerField(min=1, blank=True) dir6 = models.IntegerField( choices=[ [1, "A"], [2, "B"], [3, "C"], [4, "D"], [5, "E"], [6, "F"], [7, "G"], [8, "H"], [9, "I"], [10, "J"], [11, "K"], [12, "L"], [13, "M"], [14, "N"], [15, "O"], [16, "P"], [17, "Q"], [18, "R"], [19, "S"], [20, "T"], [21, "U"], [22, "V"], [23, "W"], [24, "X"], [25, "Y"], [26, "Z"] ], blank=True ) dir7 = models.IntegerField( choices=[ [1, "Bis"], [2, "Este"], [3, "Noreste"], [4, "Noroeste"], [5, "Oeste"], [6, "Sur"], [7, "Sureste"], [8, "Suroeste"] ], blank=True ) dir8 = models.IntegerField(min=1, blank=True) dir9 = models.IntegerField( choices=[ [1, "A"], [2, "B"], [3, "C"], [4, "D"], [5, "E"], [6, "F"], [7, "G"], [8, "H"], [9, "I"], [10, "J"], [11, "K"], [12, "L"], [13, "M"], [14, "N"], [15, "O"], [16, "P"], [17, "Q"], [18, "R"], [19, "S"], [20, "T"], [21, "U"], [22, "V"], [23, "W"], [24, "X"], [25, "Y"], [26, "Z"] ], blank=True ) dir10 = models.IntegerField( choices=[ [1, "Bis"], [2, "Este"], [3, "Noreste"], [4, "Noroeste"], [5, "Oeste"], [6, "Sur"], [7, "Sureste"], [8, "Suroeste"] ], blank=True ) dir11 = models.StringField(blank=True) dir12 = models.StringField(blank=True) # FUNCTIONS def creating_session(subsession: Subsession): global paying_round subsession.group_randomly(fixed_id_in_group=True) if subsession.round_number == 1: paying_round = random.randint(1, Constants.num_rounds) subsession.session.vars['paying_round'] = paying_round print("la ronda a pagar es", paying_round) for g in subsession.get_groups(): for p in g.get_players(): p.random_round = paying_round # PAGES class InstructionsEsp(Page): @staticmethod def is_displayed(player: Player): return player.round_number == 1 class Introduction(Page): @staticmethod def is_displayed(player: Player): return player.round_number == 1 class InstructionsGen(Page): @staticmethod def is_displayed(player: Player): return player.round_number == 1 class Offer(Page): form_model = 'group' form_fields = ['sent_amount'] @staticmethod def is_displayed(player: Player): return player.id_in_group == 1 @staticmethod def vars_for_template(player: Player): mostrar_ronda = True if player.subsession.round_number == 1: mostrar_ronda = False return dict(mostrar=mostrar_ronda) class ExpectationsB(Page): form_model = 'group' form_fields = ['expectation_sent'] @staticmethod def is_displayed(player: Player): return player.id_in_group == 2 @staticmethod def vars_for_template(player: Player): mostrar_ronda = True if player.subsession.round_number == 1: mostrar_ronda = False return dict(mostrar=mostrar_ronda) class RoundResults(Page): @staticmethod def vars_for_template(player: Player): mostrar_ronda = True if player.subsession.round_number == 1: mostrar_ronda = False return dict( round_paymentA=Constants.endowmentA - player.group.sent_amount, mostrar=mostrar_ronda ) @staticmethod def before_next_page(player: Player, timeout_happened): group = player.group playerA = group.get_player_by_id(1) playerB = group.get_player_by_id(2) playerC = group.get_player_by_id(3) playerA.round_payoff = (Constants.endowmentA - group.sent_amount) * 2 playerB.round_payoff = (group.sent_amount) * 2 playerC.round_payoff = (Constants.endowmentC) * 2 playerB.expected_sent_ammount_B = group.expectation_sent playerB.global_payoff = group.sent_amount * 2 Groups = player.subsession.get_groups() ##Creencias para la cantidad enviada por A. values_sent_ammount = [] for g in Groups: values_sent_ammount.append(g.sent_amount) # Vector de modas repetitions_1 = 0 for i in values_sent_ammount: aparitions = values_sent_ammount.count(i) if aparitions > repetitions_1: repetitions_1 = aparitions modes_sent_ammount = [] for i in values_sent_ammount: aparitions = values_sent_ammount.count(i) if aparitions == repetitions_1 and i not in modes_sent_ammount: modes_sent_ammount.append(i) if playerB.expected_sent_ammount_B in modes_sent_ammount: playerB.bel_sent = True playerB.global_payoff += cu(3) * 2 class DespuesRondaUno(Page): @staticmethod def is_displayed(player: Player): return player.round_number == 1 class ResultsWaitPage(WaitPage): @staticmethod def is_displayed(player: Player): return player.round_number == Constants.num_rounds @staticmethod def after_all_players_arrive(group: Group): num_round = group.session.vars['paying_round'] group = group player_A = group.get_player_by_id(1) player_B = group.get_player_by_id(2) player_C = group.get_player_by_id(3) player_A.payoff = player_A.in_round(num_round).round_payoff player_B.payoff = player_B.in_round(num_round).global_payoff player_C.payoff = player_C.in_round(num_round).round_payoff Groups = group.subsession.get_groups() ##Creencias para B en la última ronda (normas sociales) matching = random.randint(0, len(Groups) - 2) ##pregunta 1 norms_B_s1 = [] for g in Groups: norms_B_s1.append(g.expectation_social_norm_s1_B) norms_B_s1.remove(group.expectation_social_norm_s1_B) if norms_B_s1[matching] == group.expectation_social_norm_s1_B: player_B.payoff += cu(1) * 2 ##Creencias para C en la última ronda (normas sociales) ##pregunta 1 norms_C_s1 = [] for g in Groups: norms_C_s1.append(g.expectation_social_norm_s1_C) norms_C_s1.remove(group.expectation_social_norm_s1_C) if norms_C_s1[matching] == group.expectation_social_norm_s1_C: player_C.payoff += cu(1) * 2 class Survey(Page): form_model = 'player' form_fields = ["survey_4", "survey_5", "survey_6"] @staticmethod def is_displayed(player: Player): return player.round_number == 1 class AfterSurvey(Page): @staticmethod def vars_for_template(player: Player): total_correct = 0 correct_4 = "No" if player.survey_4 == 60: correct_4 = "Si" total_correct += 1 correct_5 = "No" if player.survey_5 == 40: correct_5 = "Si" total_correct += 1 correct_6 = "No" if player.survey_6 == 50: correct_6 = "Si" total_correct += 1 show = False if total_correct < 3: show = True return dict( correct_4=correct_4, correct_5=correct_5, correct_6=correct_6, total_correct=total_correct, show=show, ) @staticmethod def is_displayed(player: Player): return player.round_number == 1 class Results(Page): @staticmethod def is_displayed(player: Player): return player.round_number == Constants.num_rounds @staticmethod def vars_for_template(player: Player): group = player.group playerA = group.get_player_by_id(1) playerB = group.get_player_by_id(2) playerC = group.get_player_by_id(3) num_round = player.session.vars['paying_round'] payoff_B = playerB.in_round(num_round).round_payoff / 2 # método para coger el vector de los valores de mensaje para la ronda escogida Groups = player.subsession.get_groups() ##Creencias para la cantidad enviada por A. payment_message_deduction = 0 if playerB.in_round(num_round).bel_sent == True: payment_message_deduction += 3 else: payment_message_deduction += 0 ##Creencias para B en la última ronda (normas sociales) matching = random.randint(0, len(Groups) - 2) social_norms_B = cu(0) ##pregunta 1 norms_B_s1 = [] correct_1_B = "no" for g in Groups: norms_B_s1.append(g.expectation_social_norm_s1_B) norms_B_s1.remove(player.group.expectation_social_norm_s1_B) if norms_B_s1[matching] == player.group.expectation_social_norm_s1_B: social_norms_B = +cu(1) correct_1_B = "Sí" ##Creencias para C en la última ronda (normas sociales) social_norms_C = cu(0) ##pregunta 1 norms_C_s1 = [] correct_1_C = "No" for g in Groups: norms_C_s1.append(g.expectation_social_norm_s1_C) norms_C_s1.remove(player.group.expectation_social_norm_s1_C) if norms_C_s1[matching] == player.group.expectation_social_norm_s1_C: social_norms_C += cu(1) correct_1_C = "Sí" ##Organización en Labels para la interfaz del jugador. # Normas sociales en la pregunta 1 para B if player.group.expectation_social_norm_s1_B == 0: belief_sn_B1 = "Muy socialmente inapropiada" elif player.group.expectation_social_norm_s1_B == 1: belief_sn_B1 = "Algo socialmente inapropiada" elif player.group.expectation_social_norm_s1_B == 2: belief_sn_B1 = "Algo socialmente apropiada" else: belief_sn_B1 = "Muy socialmente apropiada" # Normas sociales en la pregunta 1 para C if player.group.expectation_social_norm_s1_C == 0: belief_sn_C1 = "Muy socialmente inapropiada" elif player.group.expectation_social_norm_s1_C == 1: belief_sn_C1 = "Algo socialmente inapropiada" elif player.group.expectation_social_norm_s1_C == 2: belief_sn_C1 = "Algo socialmente apropiada" else: belief_sn_C1 = "Muy socialmente apropiada" # Invocamos al "grupo" en la ronda aleatoria. player = playerB.in_round(num_round) # Sobre las expectativas de B de los puntos envíados por A. if player.expected_sent_ammount_B == cu(0): belief_sent = "0 puntos" elif player.expected_sent_ammount_B == cu(10): belief_sent = "10 puntos" elif player.expected_sent_ammount_B == cu(20): belief_sent = "20 puntos" elif player.expected_sent_ammount_B == cu(30): belief_sent = "30 puntos" elif player.expected_sent_ammount_B == cu(40): belief_sent = "40 puntos" elif player.expected_sent_ammount_B: belief_sent = "50 puntos" # Modas de los puntos enviados por A modes_sent_message = "No" if player.in_round(num_round).bel_sent == True: modes_sent_message = "Sí" player_A_payoff = int(playerA.payoff) / 2 player_B_payoff = int(playerB.payoff) / 2 player_C_payoff = int(playerC.payoff) / 2 return dict( paying_round=num_round, payoff_B=payoff_B, payment_message_deduction=payment_message_deduction, player_A_payoff=player_A_payoff, player_B_payoff=player_B_payoff, player_C_payoff=player_C_payoff, social_norms_C=social_norms_C, social_norms_B=social_norms_B, correct_1_C=correct_1_C, correct_1_B=correct_1_B, modes_sent=modes_sent_message, belief_sent=belief_sent, belief_sn_B1=belief_sn_B1, belief_sn_C1=belief_sn_C1, ) class WaitForA(WaitPage): wait_for_all_groups = True title_text = "Por favor espere a que el resto de participantes tomen sus decisiones." body_text = "De vez en cuando (cada 30 segundos aproximadamente), por favor oprima el botón de teclado F5 para refrescar la conexión de su computador con el servidor del experimento, y así poder avanzar más rápidamente." class WaitForAll(WaitPage): wait_for_all_groups = True title_text = "Por favor espere a que el resto de participantes tomen sus decisiones." body_text = "De vez en cuando (cada 30 segundos aproximadamente), por favor oprima el botón de teclado F5 para refrescar la conexión de su computador con el servidor del experimento, y así poder avanzar más rápidamente." class Survey2(Page): @staticmethod def is_displayed(player: Player): total_correct = 0 if player.survey_4 == 60: total_correct += 1 if player.survey_5 == 40: total_correct += 1 if player.survey_6 == 50: total_correct += 1 show = False if total_correct < 3: show = True return show and player.round_number == 1 form_model = "player" form_fields = ["survey_8"] @staticmethod def error_message(player: Player, values): if values["survey_8"] != 65: return "Tiene un error en la respuesta." class InstructionsLastRoundB(Page): @staticmethod def is_displayed(player: Player): return player.round_number == Constants.num_rounds and player.id_in_group == 2 class InstructionsLastRoundC(Page): @staticmethod def is_displayed(player: Player): return player.round_number == Constants.num_rounds and player.id_in_group == 3 class PcProcedure(Page): @staticmethod def is_displayed(player: Player): return player.round_number == 1 class SocialNormsB(Page): form_model = 'group' form_fields = ["expectation_social_norm_s1_B"] @staticmethod def is_displayed(player: Player): return player.round_number == Constants.num_rounds and player.id_in_group == 2 class SocialNormsC(Page): form_model = 'group' form_fields = ["expectation_social_norm_s1_C"] @staticmethod def is_displayed(player: Player): return player.round_number == Constants.num_rounds and player.id_in_group == 3 class Payment(Page): @staticmethod def vars_for_template(player: Player): group = player.group player_A = group.get_player_by_id(1) player_B = group.get_player_by_id(2) player_C = group.get_player_by_id(3) player_A_payoff = player_A.payoff / 2 player_B_payoff = player_B.payoff / 2 player_C_payoff = player_C.payoff / 2 payment = player.participant.payoff.to_real_world_currency(player.session) total = player.participant.payoff_plus_participation_fee() return dict( player_A_payoff=player_A_payoff, player_B_payoff=player_B_payoff, player_C_payoff=player_C_payoff, payment=payment, total=total, ) @staticmethod def is_displayed(player: Player): return player.round_number == Constants.num_rounds class Questionnaire_A(Page): form_model = "player" form_fields = ["q1", "q2", "q3", "q4", "q5", "q6"] @staticmethod def is_displayed(player: Player): return player.round_number == Constants.num_rounds class Questionnaire_B(Page): form_model = "player" form_fields = ["q7", "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15"] @staticmethod def is_displayed(player: Player): return player.round_number == Constants.num_rounds class FinalMessage(Page): @staticmethod def is_displayed(player: Player): return player.round_number == Constants.num_rounds class AllGroupsWaitPage(WaitPage): wait_for_all_groups = True @staticmethod def is_displayed(player: Player): return player.round_number == Constants.num_rounds class PagosInicial(Page): @staticmethod def is_displayed(player: Player): return player.round_number == Constants.num_rounds class Pagos_1(Page): form_model = 'player' form_fields = ["idcard1", "expday", "expmonth", "expyear", "namep", "depto", "cityp", "country1", "email", "telephone", "dayp", "monthp", "yearp", "typepayment", "signaturep", "idcard2", "dir1", "dir2", "dir3", "dir4", "dir5", "dir6", "dir7", "dir8", "dir9", "dir10", "dir11", "dir12"] @staticmethod def is_displayed(player: Player): return player.round_number == Constants.num_rounds @staticmethod def vars_for_template(player: Player): group = player.group player_A = group.get_player_by_id(1) player_B = group.get_player_by_id(2) player_C = group.get_player_by_id(3) player_A_payoff = int(player_A.payoff) / 2 player_B_payoff = int(player_B.payoff) / 2 player_C_payoff = int(player_C.payoff) / 2 payment = player.participant.payoff.to_real_world_currency(player.session) total = player.participant.payoff_plus_participation_fee() return dict( player_A_payoff=player_A_payoff, player_B_payoff=player_B_payoff, player_C_payoff=player_C_payoff, payment=payment, total=total, ) class Pagos_2(Page): form_model = 'player' @staticmethod def is_displayed(player: Player): return player.round_number == Constants.num_rounds @staticmethod def get_form_fields(player: Player): if player.typepayment: return ['bank', 'id_bank', 'name_2', 'account_type', 'idcard3'] else: return ['platform', 'telephone_2', 'cedula'] class EtapaUno(Page): @staticmethod def is_displayed(player: Player): return player.round_number == 1 class Bienvenida(Page): @staticmethod def is_displayed(player: Player): return player.round_number == 1 class InformedConsent_1(Page): @staticmethod def is_displayed(player: Player): return player.round_number == 1 class InformedConsent_2(Page): form_model = 'player' form_fields = [ 'city', 'day', 'month', 'year', 'hour', 'minutes', 'ampm', 'name', 'signature', 'idcard', 'citycard', ] @staticmethod def is_displayed(player: Player): return player.round_number == 1 class instructionsInicio(Page): @staticmethod def is_displayed(player: Player): return player.round_number == 1 class Puntaje(Page): @staticmethod def is_displayed(player: Player): return player.round_number == 1 page_sequence = [ Introduction, InformedConsent_1, InformedConsent_2, Bienvenida, EtapaUno, Puntaje, Survey, AfterSurvey, Survey2, WaitForAll, Offer, ExpectationsB, WaitForA, RoundResults, DespuesRondaUno, InstructionsLastRoundB, InstructionsLastRoundC, SocialNormsB, SocialNormsC, AllGroupsWaitPage, ResultsWaitPage, Results, Payment, Questionnaire_A, Questionnaire_B, Pagos_1, Pagos_2, FinalMessage, ]