Exemple #1
0
class Task(djmodels.Model):
    class Meta:
        ordering = ['-created_at']

    player = djmodels.ForeignKey(to=Player,
                                 related_name='tasks',
                                 on_delete=djmodels.CASCADE)
    round_number = models.IntegerField(null=True)
    body = models.LongStringField()
    html_body = models.LongStringField()
    correct_answer = models.StringField()
    answer = models.StringField(null=True)
    created_at = djmodels.DateTimeField(auto_now_add=True)
    updated_at = djmodels.DateTimeField(auto_now=True)
    task_name = models.StringField()
    # the following method creates a new task, and requires as an input a task-generating function and (if any) some
    # parameters fed into task-generating function.
    @classmethod
    def create(cls, player, fun, **params):
        proto_task = fun(**params)
        task = cls(player=player,
                   body=proto_task.body,
                   html_body=proto_task.html_body,
                   correct_answer=proto_task.correct_answer,
                   task_name=proto_task.name)
        return task
Exemple #2
0
class Player(BasePlayer):
    # This part is for the default django widget. The blank option is necessary to have empty boxes
    checkbox_option_1 = models.BooleanField(widget=widgets.CheckboxInput,
                                            blank=True)
    checkbox_option_2 = models.BooleanField(widget=widgets.CheckboxInput,
                                            blank=True)
    checkbox_option_3 = models.BooleanField(widget=widgets.CheckboxInput,
                                            blank=True)
    # The following part is just the basis for the following html code
    html_checkbox_1 = models.LongStringField()
    html_checkbox_2 = models.LongStringField()
    html_checkbox_3 = models.LongStringField()

    # This part is for the default django widget.
    # Define input variables (in this case as characters)
    radio = models.StringField(
        choices=['A', 'B', 'C'],
        widget=widgets.RadioSelect,
    )

    html_radio = models.StringField()

    slider = models.IntegerField(min=0, max=100, widget=widgets.Slider)

    html_slider_vertical = models.PositiveIntegerField()
    html_slider_horizontal = models.PositiveIntegerField()

    choice = models.StringField(choices=['A', 'B', 'C'])
    html_choice = models.StringField(choices=['A', 'B', 'C'],
                                     widget=widgets.RadioSelect)
Exemple #3
0
class GeneralTask(djmodels.Model):
    class Meta:
        ordering = ['-created_at']
        get_latest_by = 'in_player_counter'
        abstract = True

    body = models.LongStringField()
    html_body = models.LongStringField()
    correct_answer = models.StringField()
    answer = models.StringField(null=True)
    page_name = models.StringField()
    app_name = models.StringField()
    created_at = djmodels.DateTimeField(auto_now_add=True)
    updated_at = djmodels.DateTimeField(auto_now=True)
    task_name = models.StringField()
    in_player_counter = models.IntegerField(default=0)

    @classmethod
    def create(cls, player, fun, **params):
        """
          the following method creates a new task, and requires as an input a task-generating function and (if any) some
          parameters fed into task-generating function.
        """
        proto_task = fun(**params)
        task = cls(player=player,
                   body=proto_task.body,
                   html_body=proto_task.html_body,
                   correct_answer=proto_task.correct_answer,
                   task_name=proto_task.name)
        return task
Exemple #4
0
class Player(BasePlayer):

    gender = models.IntegerField(
        label='1. What is your gender?',
        choices=[
            [1, 'Male'],
            [2, 'Female'],
        ],
        widget=widgets.RadioSelect,
    )
    age = models.IntegerField(
        label='2. How old are you?',
        min=0,
        max=80,
    )
    education = models.IntegerField(
        label='3. What is your highest education?',
        choices=[
            [1, "Highschool (ex. Abitur)"],
            [2, "Apprenticeship (ex. Ausbildung)"],
            [3, "Bachelor's degree or equivalent (ex. Diplom)"],
            [4, "Master's degree or equivalent (ex. Magister, MBA)"],
            [5, 'PhD or above'],
        ],
        widget=widgets.RadioSelect,
    )

    experience = models.BooleanField(
        label='4. Have you had any experience in forecasting?',
        choices=[[True, 'Yes'], [False, 'No']],
        widget=widgets.RadioSelect,
    )
    course = models.IntegerField(
        label='4.1 Where have you gained the experience in forecasting?',
        choices=[[1, 'From courses and trainings'], [2, 'From work'],
                 [3, 'From both']],
        widget=widgets.RadioSelect)

    forecasting_years = models.IntegerField(
        label=
        '4.2 How many years of forecasting experience in total do you have?',
        choices=[[0, 'No experience in forecasting'], [1, 'Up to 1 year'],
                 [2, '1~2 years'], [3, '2~5 years'], [4, 'more than 5 years']],
        widget=widgets.RadioSelect,
    )

    calculator = models.BooleanField(
        choices=[[True, 'Yes'], [False, 'No']],
        label='5. Did you use a calculator or calculate on a piece of paper?',
        widget=widgets.RadioSelect)
    initial_strategy = models.LongStringField(
        label=
        '6. How did you come up with the initial forecast? Please briefly describe your strategy.',
    )
    final_strategy = models.LongStringField(
        label=
        '7. How did you come up with the final forecast? Please briefly describe your strategy.',
    )
    final_comment = models.LongStringField(
        label='8. Please leave any comment you have regarding the game.', )
Exemple #5
0
class Player(BasePlayer):
    gender = models.StringField()
    age = models.IntegerField(min=18, max=100)
    major = models.StringField()
    q1a = models.IntegerField()
    q1b = models.IntegerField()
    q1c = models.IntegerField()
    q1d = models.IntegerField()
    q1e = models.IntegerField()
    q1exp = models.LongStringField()
    q2 = models.IntegerField(
        choices=[[1, 'I would bid less than my willingness to pay.'],
                 [2, 'I would bid my willingness to pay.'],
                 [3, 'I would bid more than my willingness to pay']],
        widget=widgets.RadioSelect)
    q2exp = models.LongStringField()
    q3 = models.IntegerField()
    q4 = models.IntegerField(choices=[[1, 'I prefer lottery A.'],
                                      [2, 'I prefer lottery B.'],
                                      [3, 'I don\'t care.']],
                             widget=widgets.RadioSelect)
    q4exp = models.LongStringField()
    q5 = models.IntegerField()
    q6 = models.IntegerField()
    q7 = models.IntegerField()
class Player(BasePlayer):
    # Experiment fast abgeschlossen -> damit ich checken kann, wie lange jemand gebraucht hat
    timeEnded = models.FloatField()
    checkIfCodeIsXXX = models.LongStringField()

    ### Reward

    reward = models.IntegerField(
        label=
        "Welche Kompensation möchten Sie für die Teilnahme an der Studie erhalten?",
        choices=[[1, "Versuchspersonenstunden"], [2, "Geld (via PayPal)"],
                 [0, "Keine"]],
        widget=widgets.RadioSelect)
    #studyInformation = models.BooleanField(label = "Möchten Sie weitere Informationen über den Studien-Zweck, die Forschungsfrage und das Design erhalten?",
    #choices = [[True, "Ja"], [False, "Nein"]])

    #timeEnded = models.IntegerField()

    #name = models.StringField(label = "Wie lautet Ihr Name (zur Ausstellung der Versuchspersonenstunde)?", initial = "", blank = True)

    #paypal = models.StringField(label = "Wie lautet Ihre Email-Adresse (für die PayPal-Überweisung)?", initial = "", blank = True)

    #email = models.StringField(label = "An welche Email-Adresse möchten Sie Informationen über die Studie geschickt bekommen?", blank = True)

    anmerkungen = models.LongStringField(initial="", blank=True)
class Player(BasePlayer):
    """
    Lottery section
    """
    lottery_switch_table = models.IntegerField(label='At which table would you like to switch from lottery A to lottery B?', min=1, max=11)
    """
    Post task survey related section
    """
    q1 = models.LongStringField(label='Please explain in a few sentances why you took this approach to the experiment.')
    q2 = models.IntegerField(label='On a scale of 1 to 5, where 1 is \'strongly agree\' and 5 is \'strongly disagree\', please tell us how much you agree or disagree with the statement: not declaring my extra income of £200 on my tax return is a serious offence.',
                             choices=[1, 2, 3, 4, 5], widget=widgets.RadioSelectHorizontal)
    q3 = models.IntegerField(label='On a scale of 1 to 5, where 1 is \'strongly agree\' and 5 is \'strongly disagree\', please tell us how much you agree or disagree with the statement: claiming a non-existent deduction of £50 on my tax return is a serious offence.',
                             choices=[1, 2, 3, 4, 5], widget=widgets.RadioSelectHorizontal)
    q4 = models.IntegerField(label='On a scale of 1 to 5, where 1 is \'strongly agree\' and 5 is \'strongly disagree\', please tell us how much you agree or disagree with the statement: one can criticize a person who declared lower income than was the case on his/her tax return when there are so many others doing the same.',
                             choices=[1, 2, 3, 4, 5], widget=widgets.RadioSelectHorizontal)
    q5 = models.IntegerField(label='On a scale of 1 to 5, where 1 is \'strongly agree\' and 5 is \'strongly disagree\', please tell us how much you agree or disagree with the statement: one can criticize others who exploit the many possibilities there are to evade taxes.',
                             choices=[1, 2, 3, 4, 5], widget=widgets.RadioSelectHorizontal)
    q6 = models.IntegerField(label='On a scale of 1 to 5, where 1 is \'strongly agree\' and 5 is \'strongly disagree\', please tell us how much you agree or disagree with the statement: you can defend people who evade taxes because the tax system is unfair.',
                             choices=[1, 2, 3, 4, 5], widget=widgets.RadioSelectHorizontal)
    q7 = models.IntegerField(label='On a scale of 1 to 5, where 1 is \'strongly agree\' and 5 is \'strongly disagree\', please tell us how much you agree or disagree with the statement: I think robbing a kiosk of £30 is a serious illegality.',
                             choices=[1, 2, 3, 4, 5], widget=widgets.RadioSelectHorizontal)
    q8 = models.IntegerField(label='On a scale of 1 to 5, where 1 is \'strongly agree\' and 5 is \'strongly disagree\', please tell us how much you agree or disagree with the statement: I think embezzling £50 from an association which I am a member is a serious illegality.',
                             choices=[1, 2, 3, 4, 5], widget=widgets.RadioSelectHorizontal)
    q9 = models.IntegerField(label='On a scale of 1 to 5, where 1 is \'strongly agree\' and 5 is \'strongly disagree\', please tell us how much you agree or disagree with the statement: I think stealing a wallet containing £20 is a serious illegality.',
                             choices=[1, 2, 3, 4, 5], widget=widgets.RadioSelectHorizontal)
    q10 = models.StringField(label='Are you male or female?',
                             choices=['Male', 'Female'], widget=widgets.RadioSelect)
    q11 = models.IntegerField(label='How old are you?', min=5, max=125)
    q12 = models.FloatField(label='How many years have you studied at UEA?', min=0, max=10)
    q13 = models.StringField(label='What degree are you studying')
    q14 = models.BooleanField(label='Have you previously been employed?', choices=[[True, 'Yes'], [False, 'No']])
    q15 = models.StringField(label='\tIf yes, what was your occupation?', blank=True)
    q16 = models.BooleanField(label='Have you ever been self-employed?', choices=[[True, 'Yes'], [False, 'No']])
    q17 = models.LongStringField(label='Please provide a short description about your feelings towards the National Health Service (NHS), in particular whether you feel positively or negatively about it.')
Exemple #8
0
class Player(BasePlayer):

    # Type
    type = models.StringField()
    # Draws
    draw_1 = models.IntegerField(blank=True)
    draw_2 = models.IntegerField(blank=True)
    draw_3 = models.IntegerField(blank=True)
    draw_4 = models.IntegerField(blank=True)
    draw_5 = models.IntegerField(blank=True)
    draw_6 = models.IntegerField(blank=True)
    draw_7 = models.IntegerField(blank=True)
    draw_8 = models.IntegerField(blank=True)
    draw_9 = models.IntegerField(blank=True)
    draw_10 = models.IntegerField(blank=True)
    draw_11 = models.IntegerField(blank=True)
    draw_12 = models.IntegerField(blank=True)
    draw_13 = models.IntegerField(blank=True)
    draw_14 = models.IntegerField(blank=True)
    draw_15 = models.IntegerField(blank=True)
    draw_16 = models.IntegerField(blank=True)
    draw_17 = models.IntegerField(blank=True)
    draw_18 = models.IntegerField(blank=True)
    draw_19 = models.IntegerField(blank=True)
    draw_20 = models.IntegerField(blank=True)
    attention_check = models.IntegerField()
    current_max_is = models.IntegerField()
    num_draws = models.IntegerField()
    total_costs = models.IntegerField()

    # Prompt Counter
    prompt_counter = models.IntegerField()
    Task_warnings = models.FloatField()

    # Hypothetical questions
    strategy = models.LongStringField(label="Ihre Antwort:")
    altcost = models.LongStringField(label="Ihre Antwort:")
    altbound = models.LongStringField(label="Ihre Antwort:")
    belief = models.IntegerField(label="Ihre Antwort:")

    # dynamically adjust limits
    def belief_max(self):
        if self.type == 'r1':
            return Constants.low_ability[1]
        elif self.type == 'r2':
            return Constants.high_ability[1]

    def belief_min(self):
        if self.type == 'r1':
            return Constants.low_ability[0]
        elif self.type == 'r2':
            return Constants.high_ability[0]

    expectation = models.LongStringField(label="Ihre Antwort:")
    ideal = models.LongStringField(label="Ihre Antwort:")
Exemple #9
0
class Player(BasePlayer):
    transcribed_text = models.LongStringField()
    transcribed_text2 = models.LongStringField()
    levenshtein_distance = models.IntegerField()
    ratio = models.FloatField()     # Multiplied by base income to determine starting income
    contribution = models.IntegerField(min = 0, initial = -1)
    income = models.CurrencyField()
    spanish = models.BooleanField()
    done = models.BooleanField()
    transcriptionDone = models.BooleanField()
    payoff = models.FloatField()
Exemple #10
0
class Player(BasePlayer):
    transcribed_text = models.LongStringField()
    transcribed_text2 = models.LongStringField()
    levenshtein_distance = models.IntegerField()
    ratio = models.FloatField()
    contribution = models.IntegerField(min = 0, initial = -1)
    income = models.IntegerField()
    spanish = models.BooleanField()
    done = models.BooleanField()
    transcriptionDone = models.BooleanField()
    payoff = models.FloatField()
    refText = models.LongStringField()
    audit = models.BooleanField()
Exemple #11
0
class Player(BasePlayer):
    treatment = models.StringField()
    dump_phones = models.LongStringField()
    num_phones = models.IntegerField()
    demographics = models.LongStringField()

    def set_payoff(self):
        n_phones = self.phones.all().count()
        self.num_phones = n_phones
        if self.treatment == 'flat':
            self.payoff = Constants.flat_fee
        else:
            self.payoff = (Constants.per_phone_fee * n_phones)
Exemple #12
0
class Player(BasePlayer):

    # number of correct answers in baseline task
    game2_score = models.IntegerField()

    # player's rank out of 3
    game2_rank = models.IntegerField()

    # player's bonus for game 2
    game2_bonus = models.IntegerField()

    # number of problems attempted
    attempted = models.IntegerField()

    # firm chosen
    firm = models.StringField()

    # arrival times for pages
    time_Instructions2 = models.StringField()
    time_Game2 = models.StringField()
    time_Results2 = models.StringField()
    time_Results = models.StringField()
    time_Survey7 = models.StringField()
    time_Survey8 = models.StringField()
    time_Survey10 = models.StringField()
    time_Survey12 = models.StringField()

    q7_choice = models.StringField(
        widget=widgets.RadioSelect,
        choices=['Yes', 'No'],
        label='You chose Firm A/B in the first contest. \
        If given the choice again would you still choose Firm A/B or would you change your choice?'
    )

    q7 = models.LongStringField(label='Why?')
    q8 = models.StringField(
        widget=widgets.RadioSelect,
        choices=['Won', 'Came Second', 'Lost'],
        label='Do you think you won, came second, or lost the first contest?')
    q9 = models.StringField(
        widget=widgets.RadioSelect,
        choices=['Won', 'Came Second', 'Lost'],
        label='Do you think you won, came second, or lost the second contest?')
    q10 = models.PositiveIntegerField(label='Age')
    q11 = models.StringField(widget=widgets.RadioSelect,
                             choices=['Man', 'Woman', 'Non-binary', 'Other'],
                             label='Gender')
    q12 = models.LongStringField(
        label=
        'Was there any part of the study that was confusing? Please help us improve our study by providing feedback.'
    )
Exemple #13
0
class Player(BasePlayer):
    Gender = models.StringField(choices=[['Male', 'Male'], ['Female', 'Female'], ['Other ', 'Other ']], label='What is your gender?')
    Race = models.LongStringField(choices=[['American Indian/Alaska Native', 'American Indian/Alaska Native'], ['Asian, Native Hawaiian or other Pacific Islander', 'Asian, Native Hawaiian or other Pacific Islander'], ['Black of African American', 'Black of African American'], ['White, non-hispanic origin ', 'White, non-hispanic origin '], ['Hispanic ', 'Hispanic '], ['Multiple ', 'Multiple '], ['Other', 'Other']], label='With which group do you most identify?')
    Relationship = models.StringField(choices=[['Single', 'Single'], ['Dating, not living together', 'Dating, not living together'], ['Dating, living together ', 'Dating, living together '], ['Engaged, not living together ', 'Engaged, not living together '], ['Engaged, living together', 'Engaged, living together'], ['Married', 'Married'], ['Domestic Partnership', 'Domestic Partnership'], ['Other', 'Other']], label='What is your current relationship status?')
    SexualOrientation = models.StringField(blank=True, choices=[['Straight', 'Straight'], ['Gay/Lesbian', 'Gay/Lesbian'], ['Bisexual', 'Bisexual'], ['Other', 'Other']], label='Which best describes your sexual orientation?')
    Job = models.StringField(blank=True, label='What is your current job?')
    Education = models.StringField(choices=[['None', 'None'], ['Elementary School', 'Elementary School'], ['Middle School', 'Middle School'], ['Some High School', 'Some High School'], ['High School', 'High School'], ['Some College', 'Some College'], ['Associates', 'Associates'], ["Bachelor's", "Bachelor's"], ['Graduate Degree', 'Graduate Degree'], ['Doctorate ', 'Doctorate ']], label='How many years of formal education have you completed?')
    Ladder = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10']], label='   ')
    PoliticalParty = models.FloatField()
    PoliticalOrientation = models.StringField(choices=[['A Democrat', 'A Democrat'], ['A Republican', 'A Republican'], ['An Independent', 'An Independent'], ['Other', 'Other'], ['None', 'None']], label='Politically speaking, do you consider yourself:', widget=widgets.RadioSelect)
    Age = models.IntegerField(label='Please enter your age')
    Compromise = models.LongStringField(blank=True, label='What do you consider a compromise?:')
    Comments = models.LongStringField(blank=True, label='Please feel free to make any additional comments about the study')
    Issues = models.LongStringField(blank=True, label='Did you experience any technical issues during the experiment? If so, please explain what these issues were')
Exemple #14
0
class Player(BasePlayer):
    sender_allocation = models.CurrencyField(min=0, max=Constants.endowment)
    sender_expectation = models.IntegerField(min=0, max=900)

    def role(self):
        if self.id_in_group == Constants.players_per_group:
            return 'distributor'
        return 'sender {}'.format(self.id_in_group)

    survey1 = models.StringField(choices=['Male', 'Female', 'Non-Binary', 'I prefer not to say'],
                                 widget=widgets.RadioSelect)
    survey2 = models.LongStringField(blank=True)

    survey3 = models.LongStringField(blank=True)
Exemple #15
0
class Player(BasePlayer):
    # Player 1 - sentences
    p1_a = models.LongStringField()
    p1_b = models.LongStringField()
    p1_c = models.LongStringField()
    p1_d = models.LongStringField()
    p1_e = models.LongStringField()
    p1_f = models.LongStringField()
    p1_g = models.LongStringField()
    p1_h = models.LongStringField()
    p1_i = models.LongStringField()
Exemple #16
0
class Player(BasePlayer):

    def role(self):
        if self.id_in_group == 1:
            return 'Employer'
        if self.id_in_group == 2:
            return 'Worker'

    def get_partner(self):
        return self.get_others_in_group()[0]

    mturkid = models.StringField()

    Question1 = models.LongStringField(
        choices=["Work on a task for 10 minutes.",
                 "Select a bonus rate for a team-member/worker who will work on a task.",
                 # "Select a bonus rate and a reward decision for a person who will work on a task.",
                 "Select a bonus rate and work on a task."],
        widget=widgets.RadioSelect
    )

    Question2 = models.IntegerField()
    Question3 = models.IntegerField()
    Question4 = models.BooleanField(
        choices=[True, False]
    )
    Question5 = models.BooleanField(
        choices=[True, False]
    )
    Question6E = models.FloatField()
    Question6W = models.FloatField()

    Question7E = models.FloatField()
    Question7W = models.FloatField()
    Question8 = models.StringField(
        choices=['Team member/boss',
                 'Experimenters/Researchers',
                 'Computer/Random']
    )
    Question9 = models.BooleanField(
        choices=[True, False]
    )

    Feedback = models.LongStringField(
        blank=True
    )

    testimage = django_models.TextField(default='0')
    delete_photo = models.BooleanField()
Exemple #17
0
class Player(BasePlayer):

    # Player 1 - stories
    p1_s1 = models.LongStringField()
    p1_s2 = models.LongStringField()
    p1_s3 = models.LongStringField()
    p1_s4 = models.LongStringField()
    p1_s5 = models.LongStringField()
    p1_s6 = models.LongStringField()
    p1_s7 = models.LongStringField()
    p1_s8 = models.LongStringField()
    p1_s9 = models.LongStringField()
Exemple #18
0
class Player(BasePlayer):
    typeracer = models.LongStringField(blank=True)
    this_round_point = models.FloatField(initial=0)
    random_num = models.IntegerField(initial=0)
    declare = models.FloatField(min=0)
    fine = models.FloatField(initial=0)
    not_deklarert = models.FloatField(initial=0)
    score_after_taxes = models.FloatField()
    got_audited_score = models.FloatField(initial=0)
    not_audited_score = models.FloatField()
    eq1 = models.IntegerField(label='21-12 =')
    eq2 = models.IntegerField(label='43-15 = ')
    eq3 = models.IntegerField(label='76-20  =')
    eq4 = models.IntegerField(label='90-45 = ')
    eq5 = models.IntegerField(label='22-11 = ')
    eq6 = models.IntegerField(label='61-26 =')
    eq7 = models.IntegerField(label='53-15 =')
    eq8 = models.IntegerField(label='38-22 =')
    eq9 = models.IntegerField(label='15*3 =')
    eq10 = models.IntegerField(label='33 + 36 =')

    def declare_max(self):
        return self.this_round_point

    def posibility(self):
        import random
        self.random_num = random.randint(1, 100)
Exemple #19
0
class Player(BasePlayer):
    treatment = models.StringField()

    choice = models.StringField()

    # decision time collected by JavaScript method
    jsdectime_start = models.FloatField()
    jsdectime_end = models.FloatField()
    jsdectime = models.FloatField()
    # decision time collected by Python method
    pydectime = models.FloatField()

    pyresttime = models.FloatField()

    reward = models.FloatField()
    risk = models.FloatField()
    certainty = models.FloatField()
    display = models.IntegerField()

    # Whether the lottery is chosen in the trial: 1 = yes, 0 = no
    lottery = models.IntegerField()

    decmode = models.PositiveIntegerField(choices=[
        [7, 'Almost always (near 100% of the time)'],
        [6, 'Very often (about 80% of the time)'],
        [5, 'Moderately often (about 60% of the time)'],
        [4, 'About half of the time (50% of the time)'],
        [3, 'Moderately seldom (about 40% of the time)'],
        [2, 'Very seldom (about 20% of the time)'],
        [1, 'Almost never (near 0% of the time)'],
    ],
                                          widget=widgets.RadioSelect())

    payoff_ddm = models.LongStringField()
    pay_pound = models.FloatField()
Exemple #20
0
class Player(BasePlayer):
    def role(self):
        if self.id_in_group == 1:
            return 'manipulation'
        if self.id_in_group == 2:
            return 'control'

    recall_keyword_1 = models.StringField()
    recall_keyword_2 = models.StringField()
    recall_keyword_3 = models.StringField()
    recall_keyword_4 = models.StringField()
    recall_statement = models.LongStringField()

    recall_manipulation_check_1 = models.IntegerField(
        choices=range(1, 8, 1),
        widget=widgets.RadioSelect,
        label="此时此刻,我感到很怀旧。")
    recall_manipulation_check_2 = models.IntegerField(
        choices=range(1, 8, 1),
        widget=widgets.RadioSelect,
        label="我回忆的这个事件很有怀旧感。")
    recall_manipulation_check_3 = models.IntegerField(
        choices=range(1, 8, 1),
        widget=widgets.RadioSelect,
        label="回忆这个事件,此时此刻让我感到很怀旧。")
    pass
class Player(BasePlayer):
    feedback = models.LongStringField(
        blank=True,
        verbose_name=
        "Finally, if you have any comments or suggestions related to "
        "this experiment please write them down in the blank space below. "
        "Your feedback is very important to improve our research.")
class Player(BasePlayer):

    bool_comment = models.BooleanField(
        label='Möchten Sie sich zu dem Artikel äußern?')
    comment = models.LongStringField(
        label='Bitten geben Sie hier Ihren Kommentar ein.')
    filterbubble = models.BooleanField()
Exemple #23
0
class Player(BasePlayer):
    typeracer = models.LongStringField(blank=True)
    this_round_point = models.FloatField(initial=0)
    random_num = models.IntegerField(initial=0)
    declare = models.FloatField(min=0)
    fine = models.FloatField(initial=0)
    not_deklarert = models.FloatField(initial=0)
    score_after_taxes = models.FloatField()
    got_audited_score = models.FloatField(initial=0)
    not_audited_score = models.FloatField()
    eq1 = models.IntegerField(label='7-5 =')
    eq2 = models.IntegerField(label='33 + 15 =')
    eq3 = models.IntegerField(label='37 + 18 =')
    eq4 = models.IntegerField(label='13-9 =')
    eq5 = models.IntegerField(label='11 + 19 =')
    eq6 = models.IntegerField(label='22+17 =')
    eq7 = models.IntegerField(label='53 + 15 =')
    eq8 = models.IntegerField(label='74 - 22  =')
    eq9 = models.IntegerField(label='7 * 12 = ')
    eq10 = models.IntegerField(label='34 + 21 =')
    def declare_max(self):
        return self.this_round_point
    def posibility(self):
        import random
        self.random_num = random.randint(1,100)
Exemple #24
0
class Player(BasePlayer):
    # participant_name = models.StringField(
    #     label="귀하의 성명을 홍*동의 형태로 입력해주십시오.",
    #     blank=True,
    # )
    # organization_type = models.StringField(
    #     label="귀하의 소속기관을 입력해주십시오",
    #     blank=True,
    # )

    behavior_strengthening_material_barcode = models.IntegerField(
        label="지급받은 행동물품 일련번호를 입력해주십시오.",
        blank=True,
    )

    TERMINATION = models.IntegerField(
        label="행동실험이 정상적으로 종결되었는지 혹은 중간에 종결되었는지를 선택해 주십시오.",
        choices=[
            [1, "정상종결"],
            [2, "중간종결"],
        ],
        widget=widgets.RadioSelectHorizontal,
    )

    termination_reason = models.IntegerField(
        label="행동실험이 종결된 사유를 선택해주십시오.",
        choices=Constants.TERMINATION_REASON,
        widget=widgets.RadioSelect,
    )
    text_field = models.LongStringField(
        label="메모남겨주실 부분 있으시면 여기에 남겨주시면 감사드리겠습니다.",
        blank=True,
    )
Exemple #25
0
class Player(BasePlayer):

    contribution = models.CurrencyField(min=0, max=Constants.endowment)
    contribution1 = models.CurrencyField(min=0, max=Constants.endowment)

    contribution_bot1 = models.CurrencyField()
    contribution_bot2 = models.CurrencyField()
    contribution_bot3 = models.CurrencyField()

    contribution1_bot1 = models.CurrencyField()
    contribution1_bot2 = models.CurrencyField()
    contribution1_bot3 = models.CurrencyField()

    Retaliation_amount = models.IntegerField(blank=True,
                                             min=0,
                                             max=10,
                                             initial=0,
                                             widget=widgets.SliderInput(),
                                             label="처벌하는 데 포인트를 얼마나 사용하시겠습니까?")

    xyz = models.BooleanField()

    Retaliation_player = models.StringField(
        label="누구를 처벌하시겠습니까?",
        blank=True,
        choices=["Player 2", "Player 3", "Player 4"])

    participant_vars_dump = models.LongStringField()

    def truncate(self, decimals=-3):
        multiplier = 10**decimals
        return int(self.payoff * 10 * 2 * multiplier) / multiplier + 5000
Exemple #26
0
class Player(BasePlayer):
    # here we store all tasks solved in this specific round - for further analysis
    tasks_dump = models.LongStringField(
        doc='to store all tasks with answers, diff level and feedback')

    # this method returns number of correct tasks solved in this round
    @property
    def num_tasks_correct(self):
        return self.tasks.filter(correct_answer=F('answer')).count()

    # this method returns total number of tasks to which a player provided an answer
    @property
    def num_tasks_total(self):
        return self.tasks.filter(answer__isnull=False).count()

    # The following method checks if there are any unfinished (with no answer) tasks. If yes, we return the unfinished
    # task. If there are no uncompleted tasks we create a new one using a task-generating function from session settings
    def get_or_create_task(self):
        unfinished_tasks = self.tasks.filter(answer__isnull=True)
        if unfinished_tasks.exists():
            return unfinished_tasks.first()
        else:
            task = Task.create(self, self.session.vars['task_fun'],
                               **self.session.vars['task_params'])
            task.save()
            return task
Exemple #27
0
class Player(BasePlayer):
    name = models.StringField(label="The nickname you chose for the class:")
    age = models.IntegerField(label="Your Age:")
    country = models.StringField(label="Where are you from?")
    gender = models.IntegerField(
        label="Gender:",
        choices=[
            [1, 'Male'],
            [2, 'Female'],
        ]
    )
    experience = models.IntegerField(
        label="Have you ever experienced annual inflation greater than 10%?",
        choices=[
            [1, 'Yes'],
            [0, 'No'],
            ]
        )
    economics = models.IntegerField(
        label="Do you have previous training in Economics?",
        choices=[
            [1, 'Yes'],
            [0, 'No'],
        ]
    )

    inflation = models.DecimalField(max_digits=9, decimal_places=2)

    comments = models.LongStringField(label="What was your general strategy? Do you want to add some comments?")
Exemple #28
0
class Player(BasePlayer):
    Ans_one = models.BooleanField(label='請根據您聽到的問題,選出最適合的答案',
                                  widget=widgets.RadioSelect,
                                  choices=[
                                      [False, 'Jakarta'],
                                      [False, 'Kucing'],
                                      [True, 'Joko Widodo'],
                                      [False, 'Maynila Mahathir bin Mohamad'],
                                  ])

    Ans_two = models.BooleanField(label='請根據您聽到的問題,選出最適合的答案',
                                  widget=widgets.RadioSelect,
                                  choices=[
                                      [False, 'Joko Widodo'],
                                      [False, 'Mahathir bin Mohamad'],
                                      [True, 'Jakarta'],
                                      [False, 'Surabaya'],
                                  ])

    Ans_three = models.LongStringField(label='請用印尼文寫下您聽到的句子')

    # 聽了幾次,單位為次數 (hidden,根據使用者行為紀錄)
    num_listen_times = models.IntegerField(initial=0)

    # 決策時長,單位為秒數 (hidden,根據使用者行為紀錄)
    decision_duration = models.FloatField(initial=0)
class Player(BasePlayer):
    typeracer = models.LongStringField(blank=True)
    this_round_point = models.FloatField(initial=0)
    random_num = models.IntegerField(initial=0)
    declare = models.FloatField(min=0)
    fine = models.FloatField(initial=0)
    not_deklarert = models.FloatField(initial=0)
    score_after_taxes = models.FloatField()
    got_audited_score = models.FloatField(initial=0)
    not_audited_score = models.FloatField()
    eq1 = models.IntegerField(label='11 - 7 = ')
    eq2 = models.IntegerField(label='5 * 8 =')
    eq3 = models.IntegerField(label='45 - 30 = ')
    eq4 = models.IntegerField(label='44 + 30 ')
    eq5 = models.IntegerField(label='6 * 6 = ')
    eq6 = models.IntegerField(label='4 + 17 =')
    eq7 = models.IntegerField(label='52 - 30 = ')
    eq8 = models.IntegerField(label='44 - 33 = ')
    eq9 = models.IntegerField(label='90 - 30 = ')
    eq10 = models.IntegerField(label='28 - 11 = ')

    def declare_max(self):
        return self.this_round_point

    def posibility(self):
        import random
        self.random_num = random.randint(1, 100)
Exemple #30
0
class Player(BasePlayer):

    # mobile version. If = 1 then get on page where you are forced to quit
    mobileVersion = models.IntegerField()

    # Consent
    consent = models.BooleanField(choices=[
        [True, "Ja"],
        [
            False,
            "Nein, ich beende die Studie jetzt (Dies ist können Sie nicht rückgängig machen)"
        ]
    ])
    consentRefused = models.LongStringField(blank=True)

    # Comprehension Questions
    priorPB1 = models.IntegerField()
    priorPB2 = models.IntegerField()
    priorPB3 = models.IntegerField()

    certaintyPriorsPB1 = models.IntegerField(initial=None)
    certaintyPriorsPB2 = models.IntegerField(initial=None)
    certaintyPriorsPB3 = models.IntegerField(initial=None)

    # problem with police brutality in Germany
    berechtigungPriorsHypoPB = models.IntegerField()
    certaintyPriorsHypoPB = models.IntegerField()

    # prolific id
    prolificID = models.StringField()

    # Testing -------------------
    # groupDecision
    groupDecision = models.IntegerField()