from otree.api import * from datetime import datetime from numpy import random doc = """ Consent forms, if the participants refuse to take part in, then exit. """ class C(BaseConstants): NAME_IN_URL = 'input_page' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): consent_no = models.IntegerField(initial = 0) pass class Group(BaseGroup): pass class Player(BasePlayer): group_no = models.IntegerField(label = "组号",min=1, max=1000) class InputPage(Page): form_model = 'player' form_fields = ['group_no'] @staticmethod def before_next_page(player,timeout_happened): import time player.participant.arrival_at_waiting = time.time() page_sequence = [ InputPage ]