# drEffects, chooseTaskB1 from __future__ import division import otree.models from otree.db import models from otree import widgets from otree.common import Currency as c, currency_range, safe_json from otree.constants import BaseConstants from otree.models import BaseSubsession, BaseGroup, BasePlayer from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) import random from django import forms from decimal import Decimal author = '' doc = """ """ class Constants(BaseConstants): name_in_url = 'chooseTask_B1' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): def creating_session(self): for p in self.get_players(): p.task_timer = self.session.config['task_timer'] class Group(BaseGroup): pass class Player(BasePlayer): choose_task_2 = models.PositiveIntegerField( verbose_name = '', choices=[(1, '1 token per correct answer'), (0, '0.5 to 1.5 tokens per correct answer (determined by the experimenter)'), ], widget=widgets.RadioSelectHorizontal() ) task_timer = models.PositiveIntegerField( doc="""The length of the real effort task timer.""" ) gender_perform = models.PositiveIntegerField( choices=[(1, 'Female'), (0, 'Male'), (2, 'Other'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label='Which gender group do you think gives the most correct answers, on average, in such a task?' ) degree_level_perform = models.PositiveIntegerField( choices=[ (1, 'undergraduate students'), (2, 'postgraduate students'), (3, 'not the students'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label='Which group of participants do you think gives the most correct answers, on average, in such a task?' ) degree_perform = models.PositiveIntegerField( choices=[ (1, 'Psychology'), (2, 'Sociology'), (3, 'Law'), (4, 'Economics'), (5, 'Government and International Relations'), (6, 'Mathematics'), (7, 'Computer Science'), (8, 'A natural science'), (9, 'other'), (99, 'Prefer not to say')], widget=widgets.RadioSelect(), label='What is the degree subject of the students who you think give the most correct answers, on average, in such a task?' )