from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants from random import sample import random import time class Page19_pre(Page): def before_next_page(self): self.player.page19_pre_end = str(time.time()) class Page19(Page): form_model = 'player' form_fields = ['page19_answer', 'page19_1', 'page19_2', 'page19_3', 'page19_4', 'page19_5', 'page19_6', 'page19_7', 'page19_8'] def before_next_page(self): end = time.time() total_time = str(end - float(self.player.page19_pre_end)) self.player.page19_focus_time = total_time def vars_for_template(self): title = ['Consultants advice', 'Scientific research', 'Consult with employees', 'Scientific research', 'Consult with employees', 'Consult senior managers', 'Consultants advice', 'Consult senior manager'] sentence1 = "Punishing the employees that misbehave may be the best option and a company-wide training may contribute to negative outcomes" sentence2 = "Rewarding the employees that adhere to the regulations may be the best option and punishing the employees that misbehave may contribute to negative outcomes" sentence3 = "Employees feel that a company-wide training may be the best option and punishing the whole team of employees that misbehave may contribute to negative outcomes" sentence4 = 'Rewarding the employees that adhere to the regulations may be the best option and a company-wide training may contribute to negative outcomes' sentence5 = 'Employees feel that rewarding the employees that adhere to the regulations may be the best option and a punishing the employees that misbehave may contribute to negative outcomes' sentence6 = 'In the past what may have worked was rewarding the employees that adhere to the regulations, and a punishing the team of employees that misbehave may have contributed to negative outcomes' sentence7 = 'Punishing the whole team of the employees that misbehave may be the best option and rewarding the employees that adhere to the regulations may contribute to negative outcomes' sentence8 = "In the past what may have worked best was rewarding the employees that adhere to the regulations and a punishing the team of employees that misbehave may contribute to negative outcomes" sentencelist = [sentence1, sentence2, sentence3, sentence4, sentence5, sentence6, sentence7, sentence8] name = [0, 1, 2, 3, 4, 5, 6, 7] select1 = "Perform regular audits and punish the employees that did not follow the health and safety regulations" select2 = "Launch a company-wide training program on the importance of health and safety regulations" select3 = "Audit different teams in random order and reward the teams that are adhering to the regulations" select4 = "Perform regular audits and punish the whole team if one member does not adhere to the regulations. " samples = sample(name, 8) return dict( headline = "TRIAL QUESTION: Recently there have been several accidents at your workplace. An internal audit was performed and the resulting report indicates that some of your employees are not following the health and safety regulations. What initiative would you implement to make sure your employees follow these regulations?", t1 = title[samples[0]], t2 = title[samples[1]], t3 = title[samples[2]], t4 = title[samples[3]], t5 = title[samples[4]], t6 = title[samples[5]], t7 = title[samples[6]], t8 = title[samples[7]], s1 = sentencelist[samples[0]], s2 = sentencelist[samples[1]], s3 = sentencelist[samples[2]], s4 = sentencelist[samples[3]], s5 = sentencelist[samples[4]], s6 = sentencelist[samples[5]], s7 = sentencelist[samples[6]], s8 = sentencelist[samples[7]], select1=select1, select2=select2, select3=select3, select4=select4 ) class Page20(Page): def get_timeout_seconds(self): return self.player.get_game_timeout_seconds() class page21(Page): form_model = 'player' form_fields = ['page21_answer', 'page21_1', 'page21_2', 'page21_3', 'page21_4', 'page21_5', 'page21_6', 'page21_7', 'page21_8'] def before_next_page(self): end = time.time() total_time = str(end - float(self.player.page21_pre_end)) self.player.page21_focus_time = total_time def vars_for_template(self): p21 = self.player.page21_answer p22 = self.player.page22_answer p23 = self.player.page23_answer p24 = self.player.page24_answer p25 = self.player.page25_answer p26 = self.player.page26_answer p27 = self.player.page27_answer p28 = self.player.page28_answer point = 0 if p21 == 1: point += 100; if p22 == 4: point += 100; if p23 == 2: point += 100; if p24 == 1: point += 100; if p25 == 3: point += 100; if p26 == 4: point += 100; if p27 == 1: point += 100; if p28 == 1: point += 100; title = ['Consultants advice', 'Scientific research', 'Consult with customers', 'Scientific research', 'Consult with customers', 'Consult senior managers', 'Consultants advice', 'Consult senior manager'] sentence1 = "Our expertise suggests that a large event in the city may be the best option and waiting until after Christmas might be a bad investment." sentence2 = "A study of over 20 companies suggests focusing on social media may be the best option, and that organising a large event in the city may be a bad investment" sentence3 = "A survey of some of your customers shows that launching a TV campaign in Christmas may be the best option and that focusing on social media may be a bad investment" sentence4 = 'A study of over 20 companies suggests waiting until after Christmas may be the best option, and that launching a TV campaign in Christmas may be a bad investment' sentence5 = 'A survey of some of your customers shows that waiting until after Christmas or organising a large event in the city may be the best options' sentence6 = '“I’ve worked in each several marketing campaigns already. It seems to me that focusing on social media may be the best option and that a TV campaign in Christmas may be a bad investment”' sentence7 = 'Our expertise suggests that a large event in the city may be the best option and waiting until after Christmas might be a bad investment' sentence8 = '“I’ve worked in several marketing campaigns already. It seems to me that waiting until after Christmas may be the best option, and that a large event in the city may be a bad investment”' sentencelist = [sentence1, sentence2, sentence3, sentence4, sentence5, sentence6, sentence7, sentence8] name = [0, 1, 2, 3, 4, 5, 6, 7] samples = sample(name, 8) select1 = "Perform regular audits and punish the employees that did not follow the health and safety regulations" select2 = "Launch a company-wide training program on the importance of health and safety regulations" select3 = "Audit different teams in random order and reward the teams that are adhering to the regulations" select4 = "Perform regular audits and punish the whole team if one member does not adhere to the regulations. " return dict( point = point, t1 = title[samples[0]], t2 = title[samples[1]], t3 = title[samples[2]], t4 = title[samples[3]], t5 = title[samples[4]], t6 = title[samples[5]], t7 = title[samples[6]], t8 = title[samples[7]], s1 = sentencelist[samples[0]], s2 = sentencelist[samples[1]], s3 = sentencelist[samples[2]], s4 = sentencelist[samples[3]], s5 = sentencelist[samples[4]], s6 = sentencelist[samples[5]], s7 = sentencelist[samples[6]], s8 = sentencelist[samples[7]], select1=select1, select2=select2, select3=select3, select4=select4 ) class page22(Page): form_model = 'player' form_fields = [ 'page22_answer', 'page22_1', 'page22_2', 'page22_3', 'page22_4', 'page22_5', 'page22_6', 'page22_7', 'page22_8'] start = time.time() def before_next_page(self): end = time.time() total_time = str(end - float(self.player.page22_pre_end)) self.player.page22_focus_time = total_time def vars_for_template(self): p21 = self.player.page21_answer p22 = self.player.page22_answer p23 = self.player.page23_answer p24 = self.player.page24_answer p25 = self.player.page25_answer p26 = self.player.page26_answer p27 = self.player.page27_answer p28 = self.player.page28_answer point = 0 if p21 == 1: point += 100; if p22 == 4: point += 100; if p23 == 2: point += 100; if p24 == 1: point += 100; if p25 == 3: point += 100; if p26 == 4: point += 100; if p27 == 1: point += 100; if p28 == 1: point += 100; headline = 'Based on the latest forecasts, you expect your team’s workload to increase next year. Several of your team members spend a lot of their time commuting to work so you are considering implementing a new policy so people can decide to work from home or in the office. You are asked to decide who this policy should apply to: Apply it to everybody, apply it to those that work individually, apply it to those with children, do not implement the new policy at all.' title = ['Consultants advice', 'Consultants advice', 'Scientific research', 'Scientific research', 'Consult with employees', 'Consult with employees', 'Consult senior manager', 'Consult senior manager'] sentence1 = 'Our expertise suggests that not implementing the policy at all may be the best option and applying it to employees with children might result in negative outcomes' sentence2 = "Our expertise suggests that not implementing the policy at all may be the best option and applying it to everybody might result in negative outcomes" sentence3 = "A study of over 20 companies suggests applying the new policy to employees with children may be the best option, and that applying the policy to employees who work individually might result in negative outcomes" sentence4 = 'A study of over 20 companies suggests applying the new policy to everybody may be the best option, and that applying the new policy to employees with children might result in negative outcomes' sentence5 = 'A survey of some of your employees shows that not implementing the policy at all or applying the new policy employees who work individually may be the best option' sentence6 = 'A survey of some of your employees shows that applying the new policy to employees with children may be the best option, and that applying the new policy to everybody might result in negative outcomes' sentence7 = '“I’ve worked in different departments where this policy was applied. It seems to me that not implementing the policy at all may be the best option and that applying the new policy to employess who work individually may result in negative outcomes”' sentence8 = '“I’ve worked in different departments where this policy was applied. It seems to me that applying the policy to employees who work individually may be the best option, and that not implementing the policy at all may result in negative outcomes’' sentencelist = [sentence1, sentence2, sentence3, sentence4, sentence5, sentence6, sentence7, sentence8] name = [0, 1, 2, 3, 4, 5, 6, 7] select1 = "Apply the new policy to everybody" select2 = "Apply the new policy to employees who work individually" select3 = "Apply the new policy to employees with children" select4 = "Do not implement the policy at all" samples = sample(name, 8) return dict( point = point, headline = headline, t1 = title[samples[0]], t2 = title[samples[1]], t3 = title[samples[2]], t4 = title[samples[3]], t5 = title[samples[4]], t6 = title[samples[5]], t7 = title[samples[6]], t8 = title[samples[7]], s1 = sentencelist[samples[0]], s2 = sentencelist[samples[1]], s3 = sentencelist[samples[2]], s4 = sentencelist[samples[3]], s5 = sentencelist[samples[4]], s6 = sentencelist[samples[5]], s7 = sentencelist[samples[6]], s8 = sentencelist[samples[7]], select1 = select1, select2 = select2, select3 = select3, select4 = select4 ) class Page21_Extra(Page): form_model = 'player' form_fields = ['page21_answer_extra1', 'page21_answer_extra2', 'page21_answer_extra3', 'page21_answer_extra4'] class Page22_Extra(Page): form_model = 'player' form_fields = ['page22_answer_extra1', 'page22_answer_extra2', 'page22_answer_extra3','page22_answer_extra4'] class Page23_Extra(Page): form_model = 'player' form_fields = ['page23_answer_extra1', 'page23_answer_extra2', 'page23_answer_extra3','page23_answer_extra4'] class Page24_Extra(Page): form_model = 'player' form_fields = ['page24_answer_extra1', 'page24_answer_extra2', 'page24_answer_extra3','page24_answer_extra4'] class Page25_Extra(Page): form_model = 'player' form_fields = ['page25_answer_extra1', 'page25_answer_extra2', 'page25_answer_extra3','page25_answer_extra4'] class Page26_Extra(Page): form_model = 'player' form_fields = ['page26_answer_extra1', 'page26_answer_extra2', 'page26_answer_extra3','page26_answer_extra4'] class Page27_Extra(Page): form_model = 'player' form_fields = ['page27_answer_extra1', 'page27_answer_extra2', 'page27_answer_extra3','page27_answer_extra4'] class Page28_Extra(Page): form_model = 'player' form_fields = ['page28_answer_extra1', 'page28_answer_extra2', 'page28_answer_extra3','page28_answer_extra4'] class page23(Page): form_model = 'player' form_fields = ['page23_answer', 'page23_1', 'page23_2', 'page23_3', 'page23_4', 'page23_5', 'page23_6', 'page23_7', 'page23_8'] def before_next_page(self): end = time.time() total_time = str(end - float(self.player.page23_pre_end)) self.player.page23_focus_time = total_time def vars_for_template(self): p21 = self.player.page21_answer p22 = self.player.page22_answer p23 = self.player.page23_answer p24 = self.player.page24_answer p25 = self.player.page25_answer p26 = self.player.page26_answer p27 = self.player.page27_answer p28 = self.player.page28_answer point = 0 if p21 == 1: point += 100; if p22 == 4: point += 100; if p23 == 2: point += 100; if p24 == 1: point += 100; if p25 == 3: point += 100; if p26 == 4: point += 100; if p27 == 1: point += 100; if p28 == 1: point += 100; headline = 'Your latest employee survey reflects a decrease in motivation in your team. You have a small budget to spend towards the end of the year. You wonder how you could use this budget to boost your team’s morale. You are asked to decide between setting goals to give a bonus to high performers, organise a team-building activity outside the office, divide the budget equally and distribute it at the end of the year, or distribute it equally right away.' title = ['Consultants advice', 'Consultants advice', 'Scientific research', 'Scientific research', 'Consult with employees', 'Consult with employees', 'Consult senior manager', 'Consult senior manager'] sentence1 = 'Our expertise suggests that setting goals and bonuses for high performers may be the best option and distributing the budget equally now might result in negative outcomes' sentence2 = "Our expertise suggests that organising a team-building activity may be the best option and distributing the budget equally at the end of the year might result in negative outcomes" sentence3 = "A study of over 20 companies suggests distributing the budget equally now may be the best option, and that organising a team-building event might result in negative outcomes" sentence4 = 'A study of over 20 companies suggests setting goals and bonuses for high performers may be the best option, and that distributing the budget equally at the end of the year might also result in positive outcomes' sentence5 = 'A survey of some of your employees shows that organising a team-building activity may be the best option, and that distributing the budget equally now may result in negative outcomes' sentence6 = 'A survey of some of your employees shows that setting goals and bonuses for high performers may be the best option, and that distributing the budget equally at the end of the year might result in negative outcomes' sentence7 = '“I’ve had experience motivating teams in this organisation. It seems to me that distributing the budget equally at the end of the year may be the best option and that setting goals and bonuses may result in negative outcomes”' sentence8 = '“I’ve had experience motivating teams in this organisation. It seems to me that setting goals and bonuses may be the best option, and that organising a team building activity may result in negative outcomes”' sentencelist = [sentence1, sentence2, sentence3, sentence4, sentence5, sentence6, sentence7, sentence8] name = [0, 1, 2, 3, 4, 5, 6, 7] select1 = "Organise a team-building activity" select2 = "Set goals and bonuses for high performers" select3 = "Distribute the budget equally at the end of the year" select4 = "Distribute the budget equally now" samples = sample(name, 8) return dict( point = point, headline = headline, t1 = title[samples[0]], t2 = title[samples[1]], t3 = title[samples[2]], t4 = title[samples[3]], t5 = title[samples[4]], t6 = title[samples[5]], t7 = title[samples[6]], t8 = title[samples[7]], s1 = sentencelist[samples[0]], s2 = sentencelist[samples[1]], s3 = sentencelist[samples[2]], s4 = sentencelist[samples[3]], s5 = sentencelist[samples[4]], s6 = sentencelist[samples[5]], s7 = sentencelist[samples[6]], s8 = sentencelist[samples[7]], select1 = select1, select2 = select2, select3 = select3, select4 = select4 ) class page24(Page): form_model = 'player' form_fields = ['page24_answer','page24_1', 'page24_2', 'page24_3', 'page24_4', 'page24_5', 'page24_6', 'page24_7', 'page24_8'] start = time.time() def before_next_page(self): end = time.time() total_time = str(end - float(self.player.page24_pre_end)) self.player.page24_focus_time = total_time def vars_for_template(self): p21 = self.player.page21_answer p22 = self.player.page22_answer p23 = self.player.page23_answer p24 = self.player.page24_answer p25 = self.player.page25_answer p26 = self.player.page26_answer p27 = self.player.page27_answer p28 = self.player.page28_answer point = 0 if p21 == 1: point += 100; if p22 == 4: point += 100; if p23 == 2: point += 100; if p24 == 1: point += 100; if p25 == 3: point += 100; if p26 == 4: point += 100; if p27 == 1: point += 100; if p28 == 1: point += 100; headline = 'Your finance department is growing and needs to move into a new office space. You decided to hire top architects and interior designers to create a workspace that helps their productivity and wellbeing. What kind of interior design would you ask for? You are presented with four options: Open space offices, closed offices, hot desking, or cubicles.' title = ['Consultants advice', 'Consultants advice', 'Scientific research', 'Scientific research', 'Consult with employees', 'Consult with employees', 'Consult senior manager', 'Consult senior manager'] sentence1 = 'Our expertise suggests that closed offices may be the best option and cubicles might reduce productivity' sentence2 = "Our expertise suggests that open space offices may be the best option, and hot desking might reduce productivity" sentence3 = "A study of over 20 companies suggests hot desking may be the best option, and that open space offices may reduce productivity" sentence4 = 'A study of over 20 companies suggests open space offices may be the best option, and that closed offices may reduce productivity' sentence5 = 'A survey of some of your employees shows that open space offices may be the best option and that cubicles may reduce productivity' sentence6 = 'A survey of some of your employees shows that closed offices may be the best option and that hot desking may reduce productivity' sentence7 = '“I’ve worked in each of these settings in this company. It seems to me that cubicles may be the best option and that closed offices may reduce productivity”' sentence8 = '“I’ve worked in each of these settings in this company. It seems to me that open space offices or closed offices is what works best”' sentencelist = [sentence1, sentence2, sentence3, sentence4, sentence5, sentence6, sentence7, sentence8] name = [0, 1, 2, 3, 4, 5, 6, 7] select1 = "Open space offices" select2 = "Closed offices" select3 = "Hot desking (no assigned desks)" select4 = "Cubicles" samples = sample(name, 8) return dict( point = point, headline = headline, t1 = title[samples[0]], t2 = title[samples[1]], t3 = title[samples[2]], t4 = title[samples[3]], t5 = title[samples[4]], t6 = title[samples[5]], t7 = title[samples[6]], t8 = title[samples[7]], s1 = sentencelist[samples[0]], s2 = sentencelist[samples[1]], s3 = sentencelist[samples[2]], s4 = sentencelist[samples[3]], s5 = sentencelist[samples[4]], s6 = sentencelist[samples[5]], s7 = sentencelist[samples[6]], s8 = sentencelist[samples[7]], select1 = select1, select2 = select2, select3 = select3, select4 = select4 ) class page25(Page): form_model = 'player' form_fields = ['page25_answer', 'page25_1', 'page25_2', 'page25_3', 'page25_4', 'page25_5', 'page25_6', 'page25_7', 'page25_8'] start = time.time() def before_next_page(self): end = time.time() total_time = str(end - float(self.player.page25_pre_end)) self.player.page25_focus_time = total_time def vars_for_template(self): p21 = self.player.page21_answer p22 = self.player.page22_answer p23 = self.player.page23_answer p24 = self.player.page24_answer p25 = self.player.page25_answer p26 = self.player.page26_answer p27 = self.player.page27_answer p28 = self.player.page28_answer point = 0 if p21 == 1: point += 100; if p22 == 4: point += 100; if p23 == 2: point += 100; if p24 == 1: point += 100; if p25 == 3: point += 100; if p26 == 4: point += 100; if p27 == 1: point += 100; if p28 == 1: point += 100; headline = 'Lately your sales department is underperforming. You are wondering how to boost their performance by setting annual goals. You can set annual goals with regular performance reviews, with no reviews during the year, with an emphasis on autonomy as to how to achieve them, or not set a goal and encourage employees to “do their best”. ' title = ['Consultants advice', 'Consultants advice', 'Scientific research', 'Scientific research', 'Consult with employees', 'Consult with employees', 'Consult senior manager', 'Consult senior manager'] sentence1 = 'Our expertise suggests that goals with no reviews may be the best option and goals with regular performance reviews might reduce productivity' sentence2 = "Our expertise suggests that no specific goals may be the best option, and goals with no reviews might reduce productivity" sentence3 = "A study of over 20 companies suggests goals while emphasizing autonomy may be the best option, and that goals with regular performance reviews may also increase productivity" sentence4 = 'A study of over 20 companies suggests goals with no reviews may be the best option, and that no specific goals may reduce productivity' sentence5 = 'A survey of some of your employees shows that goals while emphasizing autonomy may be the best option and that goals with regular performance reviews may reduce productivity' sentence6 = 'A survey of some of your employees shows that goals with regular performance reviews may be the best option and that goals while emphasizing autonomy may reduce productivity' sentence7 = '“I’ve seen annual goals being used in this company. It seems to me that goals while emphasizing autonomy may be the best option and that goals with no reviews may reduce productivity”' sentence8 = '“I’ve seen annual goals being used in this company. It seems to me that goals while emphasizing autonomy may be the best option, and that no specific goals may reduce productivity”' sentencelist = [sentence1, sentence2, sentence3, sentence4, sentence5, sentence6, sentence7, sentence8] name = [0, 1, 2, 3, 4, 5, 6, 7] select1 = "Goals with regular performance reviews" select2 = "Goals with no reviews during the year" select3 = "Goals and emphasize autonomy" select4 = "No specific goals. Encourage the team to do their best" samples = sample(name, 8) return dict( point = point, headline = headline, t1 = title[samples[0]], t2 = title[samples[1]], t3 = title[samples[2]], t4 = title[samples[3]], t5 = title[samples[4]], t6 = title[samples[5]], t7 = title[samples[6]], t8 = title[samples[7]], s1 = sentencelist[samples[0]], s2 = sentencelist[samples[1]], s3 = sentencelist[samples[2]], s4 = sentencelist[samples[3]], s5 = sentencelist[samples[4]], s6 = sentencelist[samples[5]], s7 = sentencelist[samples[6]], s8 = sentencelist[samples[7]], select1 = select1, select2 = select2, select3 = select3, select4 = select4 ) class page26(Page): form_model = 'player' form_fields = ['page26_answer', 'page26_1', 'page26_2', 'page26_3', 'page26_4', 'page26_5', 'page26_6', 'page26_7', 'page26_8'] start = time.time() def before_next_page(self): end = time.time() total_time = str(end - float(self.player.page26_pre_end)) self.player.page26_focus_time = total_time def vars_for_template(self): p21 = self.player.page21_answer p22 = self.player.page22_answer p23 = self.player.page23_answer p24 = self.player.page24_answer p25 = self.player.page25_answer p26 = self.player.page26_answer p27 = self.player.page27_answer p28 = self.player.page28_answer point = 0 if p21 == 1: point += 100; if p22 == 4: point += 100; if p23 == 2: point += 100; if p24 == 1: point += 100; if p25 == 3: point += 100; if p26 == 4: point += 100; if p27 == 1: point += 100; if p28 == 1: point += 100; headline = 'As you set up the assembly line for your chocolate bars you hear about “Lean manufacturing” practices to increase quality and efficiency in the production lines. You are wondering who you would like prioritize to receive a training on “Lean manufacturing”.' title = ['Consultants advice', 'Consultants advice', 'Scientific research', 'Scientific research', 'Consult with employees', 'Consult with employees', 'Consult senior manager', 'Consult senior manager'] sentence1 = 'Our expertise suggests that training the top managers may be the best option and training the middle managers might cause problems' sentence2 = "Our expertise suggests that training a few people at each level in the hierarchy or training the operators may be the best options" sentence3 = "A study of over 20 companies suggests training the middle management may be the best option, and that training the top managers may cause problems" sentence4 = 'A study of over 20 companies suggests training a few people at each level in the hierarchy may be the best option, and that training the operators may cause problems' sentence5 = 'A survey of some of your employees shows that training the operators may be the best option and that training individuals at different levels in the hierarchy may cause problems' sentence6 = 'A survey of some of your employees shows that training a few individuals at each level in the hierarchy may be the best option and that training the middle managers may cause problems' sentence7 = '“I’ve launched training programs for new plants before. It seems to me that training a few individuals from each level in the hierarchy may be the best option and that training the top managers may cause problems”' sentence8 = '“I’ve launched training programs for new plants before. It seems to me that training the middle managers may be the best option, and that training the operators may cause problems”' sentencelist = [sentence1, sentence2, sentence3, sentence4, sentence5, sentence6, sentence7, sentence8] name = [0, 1, 2, 3, 4, 5, 6, 7] select1 = "Train the top managers of the plant" select2 = "Train the middle managers that supervise the assembly line" select3 = "Train the operators working in the assembly line" select4 = "Train a few individuals at each level in the hierarchy" samples = sample(name, 8) return dict( point = point, headline=headline, t1=title[samples[0]], t2=title[samples[1]], t3=title[samples[2]], t4=title[samples[3]], t5=title[samples[4]], t6=title[samples[5]], t7=title[samples[6]], t8=title[samples[7]], s1=sentencelist[samples[0]], s2=sentencelist[samples[1]], s3=sentencelist[samples[2]], s4=sentencelist[samples[3]], s5=sentencelist[samples[4]], s6=sentencelist[samples[5]], s7=sentencelist[samples[6]], s8=sentencelist[samples[7]], select1=select1, select2=select2, select3=select3, select4=select4 ) class page27(Page): form_model = 'player' form_fields = [ 'page27_answer', 'page27_1', 'page27_2', 'page27_3', 'page27_4', 'page27_5', 'page27_6', 'page27_7', 'page27_8'] start = time.time() def before_next_page(self): end = time.time() total_time = str(end - float(self.player.page27_pre_end)) self.player.page27_focus_time = total_time def vars_for_template(self): p21 = self.player.page21_answer p22 = self.player.page22_answer p23 = self.player.page23_answer p24 = self.player.page24_answer p25 = self.player.page25_answer p26 = self.player.page26_answer p27 = self.player.page27_answer p28 = self.player.page28_answer point = 0 if p21 == 1: point += 100; if p22 == 4: point += 100; if p23 == 2: point += 100; if p24 == 1: point += 100; if p25 == 3: point += 100; if p26 == 4: point += 100; if p27 == 1: point += 100; if p28 == 1: point += 100; headline = 'You are designing your new headquarters for the majority of your employees to work in. You have some extra budget and you want to spend it in a way that enables productivity and wellbeing. You are asked to decide whether you invest in: a state of the art office design, free corporate bus lines to transport employees, a sports centre for employees, or a childcare center. ' title = ['Consultants advice', 'Consultants advice', 'Scientific research', 'Scientific research', 'Consult with employees', 'Consult with employees', 'Consult senior manager', 'Consult senior manager'] sentence1 = 'Our expertise suggests that a cutting-edge office design or a sports center may be the best options ' sentence2 = "Our expertise suggests that bus lines may be the best option, and that a childcare center may not be the best investment" sentence3 = "A study of over 20 companies suggests a cutting-edge office design may be the best option, and that a sports center may not be the best investment" sentence4 = 'A study of over 20 companies suggests a sports center may be the best option, and that a cutting-edge office design may not be the best investment' sentence5 = 'A survey of some of your employees shows that a cutting-edge office design may be the best option and that corporate bus lines may not be the best investment' sentence6 = 'A survey of some of your employees shows that a cutting-edge office design may be the best option and that a childcare center may not be the best investment' sentence7 = '”From other office locations we studied it seems that corporate bus lines may be the best option and that a sports center may not be the best investment”' sentence8 = '“From other office locations we studied it seems to me that a childcare center may be the best option, and that corporate bust lines may not be the best investment”' sentencelist = [sentence1, sentence2, sentence3, sentence4, sentence5, sentence6, sentence7, sentence8] name = [0, 1, 2, 3, 4, 5, 6, 7] select1 = "Cutting-edge office design" select2 = "Corporate bus lines" select3 = "Sports center" select4 = "Childcare center" samples = sample(name, 8) return dict( point = point, headline=headline, t1=title[samples[0]], t2=title[samples[1]], t3=title[samples[2]], t4=title[samples[3]], t5=title[samples[4]], t6=title[samples[5]], t7=title[samples[6]], t8=title[samples[7]], s1=sentencelist[samples[0]], s2=sentencelist[samples[1]], s3=sentencelist[samples[2]], s4=sentencelist[samples[3]], s5=sentencelist[samples[4]], s6=sentencelist[samples[5]], s7=sentencelist[samples[6]], s8=sentencelist[samples[7]], select1=select1, select2=select2, select3=select3, select4=select4 ) class page28(Page): form_model = 'player' form_fields = ['page28_answer', 'page28_1', 'page28_2', 'page28_3', 'page28_4', 'page28_5', 'page28_6', 'page28_7', 'page28_8'] start = time.time() def before_next_page(self): end = time.time() total_time = str(end - float(self.player.page28_pre_end)) self.player.page28_focus_time = total_time def vars_for_template(self): p21 = self.player.page21_answer p22 = self.player.page22_answer p23 = self.player.page23_answer p24 = self.player.page24_answer p25 = self.player.page25_answer p26 = self.player.page26_answer p27 = self.player.page27_answer p28 = self.player.page28_answer point = 0 if p21 == 1: point += 100; if p22 == 4: point += 100; if p23 == 2: point += 100; if p24 == 1: point += 100; if p25 == 3: point += 100; if p26 == 4: point += 100; if p27 == 1: point += 100; if p28 == 1: point += 100; headline = 'You are interviewing candidates to hire as your new CEO for a subsidiary opening soon. It is critical that you choose the right person for the job as your company is making a heavy investment in this subsidiary. Your shortlisted candidates have completed several tests and gone through several interviews. You are deciding whether to hire Roger, who scored the highest in conscientiousness; Jessica, the highest in emotional intelligence; Ben, a candidate that has already been working in the company for 12 years; or Catherine who you preferred based on a long and unstructured interview.' title = ['Consultants advice', 'Consultants advice', 'Scientific research', 'Scientific research', 'Consult with employees', 'Consult with employees', 'Consult senior manager', 'Consult senior manager'] sentence1 = 'Our expertise suggests that conscientiousness may be the most important trait and work experience in the company might be a weakness' sentence2 = "Our expertise suggests that emotional intelligence and work experience in the company may be the most important traits" sentence3 = "A study of over 20 companies suggests emotional intelligence may be the best option, and that work experience in the company may be a weakness" sentence4 = 'A study of over 20 companies suggests emotional intelligence may be the best option, and that training the operators may cause problems' sentence5 = 'A survey of some of your employees shows that conscientiousness may be the best option and that the interview outcome may be misleading' sentence6 = 'A survey of some of your employees shows that the interview outcome may be the most important factor, and that conscientiousness may be a weakness' sentence7 = '“Based on the previous CEO’s we have hired in this organisations, It seems to me that experience in the company may be the most important factor and that emotional intelligence may be a weakness”' sentence8 = '“Based on the previous CEO’s we have hired in this organisation, it seems to me that emotional intelligence may be the most important factor, and that the interview outcome may be misleading”' sentencelist = [sentence1, sentence2, sentence3, sentence4, sentence5, sentence6, sentence7, sentence8] name = [0, 1, 2, 3, 4, 5, 6, 7] select1 = "Jessica, who scored highest on emotional intelligence" select2 = "Roger, who scored highest on conscientiousness" select3 = "Ben, who has 12 years experience in the organisation" select4 = "Catherine, who you preferred based on the interviews" samples = sample(name, 8) return dict( point = point, headline=headline, t1=title[samples[0]], t2=title[samples[1]], t3=title[samples[2]], t4=title[samples[3]], t5=title[samples[4]], t6=title[samples[5]], t7=title[samples[6]], t8=title[samples[7]], s1=sentencelist[samples[0]], s2=sentencelist[samples[1]], s3=sentencelist[samples[2]], s4=sentencelist[samples[3]], s5=sentencelist[samples[4]], s6=sentencelist[samples[5]], s7=sentencelist[samples[6]], s8=sentencelist[samples[7]], select1=select1, select2=select2, select3=select3, select4=select4 ) class page29(Page): # https: // github.com / AYIDouble / Tower - of - Hanoi - JavaScript pass class Page30(Page): form_model = 'player' form_fields = ['page30_q1', 'page30_q2', 'page30_q3', 'page30_q4', 'page30_q5', 'page30_q6', 'page30_q7', 'page30_q8', 'page30_q9', 'page30_q10', 'page30_q11', 'page30_q12', 'page30_q13', 'page30_q14', 'page30_q15', 'page30_q16', 'page30_q17', 'page30_q18', 'page30_q19', 'page30_q20'] class Page31(Page): pass class Information(Page): form_model = 'player' form_fields = ['game_pre'] class Game(Page): form_model = 'player' form_fields = ['game_success_times', 'total_moves'] timer_text = 'You will play the game for 2 minutes and try to complete it as many times as possible.' def get_timeout_seconds(self): print("Timeout is ", self.player.get_game_timeout_seconds()) return self.player.get_game_timeout_seconds() def app_after_this_page(self, upcoming_apps): app_names = 'final' return app_names class page21_pre(Page): def before_next_page(self): self.player.page21_pre_end = str(time.time()) class page22_pre(Page): def before_next_page(self): self.player.page22_pre_end = str(time.time()) class page23_pre(Page): def before_next_page(self): self.player.page23_pre_end = str(time.time()) class page24_pre(Page): def before_next_page(self): self.player.page24_pre_end = str(time.time()) class page25_pre(Page): def before_next_page(self): self.player.page25_pre_end = str(time.time()) class page26_pre(Page): def before_next_page(self): self.player.page26_pre_end = str(time.time()) class page27_pre(Page): def before_next_page(self): self.player.page27_pre_end = str(time.time()) class page28_pre(Page): def before_next_page(self): self.player.page28_pre_end = str(time.time()) # name2 = [0, 1, 2, 3, 4, 5, 6, 7] samples = sample(name2, 8) page2 = [page21, page22, page23, page24, page25, page26, page27, page28] page2_pre = [page21_pre, page22_pre, page23_pre, page24_pre, page25_pre, page26_pre, page27_pre, page28_pre] page_sequence = [Page19_pre, Page19, page2_pre[samples[0]], page2[samples[0]], page2_pre[samples[1]], page2[samples[1]], page2_pre[samples[2]], page2[samples[2]], page2_pre[samples[3]],page2[samples[3]], page2_pre[samples[4]], page2[samples[4]], page2_pre[samples[5]], page2[samples[5]], page2_pre[samples[6]],page2[samples[6]], page2_pre[samples[7]], page2[samples[7]], Page30, Information, Game]