from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) #from os import environ #import itertools #import math #import time #import pandas #import numpy ##from ipware import get_client_ip #import ipinfo author = 'FAU_CET' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'cet_prolific_pre_screen' players_per_group = None #whats this? num_rounds = 1 do_checks = False #environ.get('do_checks') prolific_completion_url = 'https://www.google.com/' class Subsession(BaseSubsession): print("subsession") pass class Group(BaseGroup): print("group") pass class Player(BasePlayer): loc = models.StringField(max_length=100, blank=True) ip = models.StringField(max_length=100, blank=True) email = models.LongStringField(initial="""Hi Emma, We discussed about meeting next Friday, but now I have a doubt about this. Could we prepone it to tomorrow instead? So you either need to revert back to me and suggest me another time, or book the room for tomorrow. Kindly do the needful. Best, John """) failed_email = models.BooleanField(initial=False) just_clicked_continue = models.BooleanField(initial=False) participant_vars_dump = models.StringField() def make_field2(label): return models.IntegerField( choices=[(1, ''), (2, ''), (3, '')], label=label, widget=widgets.RadioSelect ) screen = make_field2('Screening job applicants') manag = make_field2('Managing a project') create = make_field2("Create content") data = make_field2("Data analysis project") code = make_field2('Writing code for games') attention_check = make_field2('Programming in qualtro') renov = make_field2('Renovation of apartments') social = make_field2('Social Media Product Management') translat = make_field2('Translation from German to English') def standardvars(self): return { 'initial': self.participant.vars.get('initial'), 'submitted_all': self.participant.vars.get('submitted_all', 0), #'treated1': self.participant.vars.get('treated1'), #'treated2': self.participant.vars.get('treated2'), #'type_1': self.participant.vars.get('type_1'), 'failed': self.participant.vars.get('failed') == 1, 'just_clicked_continue': self.just_clicked_continue }