Group: Forum Members
Posts: 20,
Visits: 84
|
Hello, I want to reshow my instruction pages if participants fail the instructional check questions. However, I am happy problems looping back to the beginning of the trial to show the instructions. My "branch" back to the beginning of the does not work at all the program just continues to the following trials. It's highly likely that I have just coded the "branch" wrong. I have included my code below and Specifically: the code in INSTRUCTION COMPREHENSION CHECK PART 1: <surveypage HapInstrCompQ> INSTRUCTION COMPREHENSION CHECK PART 2: <surveypage FamInstrCompQ> Thank you for your help. ----------------------------------------------------------------------------------------- TITLE Experiment 1 - Face Recognition ------------------------------------------------------------------------------------------
DEFAULTS
<defaults> / fontstyle = ("Arial", 20pt) / screencolor = white / txcolor = black / halign = center / canvassize = (100%, 100%) / windowsize = (100%, 100%) </defaults>
<values> / instructnum = 1 / trialCount = 0 / CB = "NA" / group = "NA" / race = "NA" / face = "NA" / makeHappiness = 0 / missHappiness = 0 / makeFams = 0 / missFams = 0 </values>
<parameters> / nBlocks = 4 / nTrials = 60 / nTest = nTrials / ISI = 500 </parameters>
<expressions> / instructnum = if (contains(script.currenttrial, "Instructions")){values.instructnum} else {"NA"} / trialCount = if(script.currentblock == "Happiness") {values.trialCount} else {"NA"}
/ race = if(script.currenttrial == "makeHappiness") {values.race} else{ "NA"} / face = if(script.currenttrial == "makeHappiness"){values.face} else{"NA"}
/ makeHappiness = if(script.currenttrial == "makeHappiness"){values.makeHappiness} else {"NA"} / missHappiness = if(script.currenttrial == "makeHappiness"){values.makeHappiness} else {"NA"}
/ makeFams = if(script.currenttrial == "makeFams"){values.makeFams} else {"NA"} / missFams = if(script.currenttrial == "makeFams"){values.missFams} else {"NA"} </expressions>
------------------------------------------------------------------------------------------ <expt CB1> / onexptbegin = [if (computer.platform != "mac" && computer.platform != "win") script.abort()] / onexptbegin = [values.CB = 1] / groupassignment = groupnumber / blocks = [1=Welcome; 2=Happiness; 3 = Familiarity] </expt>
------------------------------------------------------------------------------------------ ****** DATA ------------------------------------------------------------------------------------------ <data> / file = "Face Recognition.iqdat" / separatefiles = true / labels = true / columns = [subject, group, date, time, blockcode, trialcode, response, latency, expressions.race, expressions.makeHappiness, expressions.missHappiness, expressions.face, expressions.makeFams, expressions.missFams] </data>
------------------------------------------------------------------------------------------ ****** BLOCKS ------------------------------------------------------------------------------------------
<block Welcome> / trials = [1 = Instructions] </block>
<block Happiness> / onblockbegin = [values.instructnum = 2; values.trialCount = 0; values.makeHappiness = 1] / trials = [1-3 = Instructions; 4 = HapInstrCompQ; 5-15 = sequence (makeHappiness, NextTrial)] / onblockend = [values.missHappiness = 0] </block>
<block Familiarity> / onblockbegin = [values.instructnum = 5; values.trialCount = 0; values.makeFams = 1] / trials = [1-3 = Instructions; 4 = FamInstrCompQ; 5-63 = sequence (makeFams, NextTrial)] / onblockend = [values.missFams = 0] </block>
------------------------------------------------------------------------------------------ ****** TRIALS ------------------------------------------------------------------------------------------
<trial NextTrial> / inputdevice = mouse / stimulusframes = [1 = clearscreen, NextButton] / validresponse = (NextButton) / posttrialpause = parameters.ISI </trial>
<trial makeHappiness> / inputdevice = mouse / ontrialbegin = [values.trialCount += 1] / stimulusframes = [1 = clearscreen, HappinessQuestion, Hap1, Hap2, Hap3, Hap4, Hap5, Hap6, 1, 2, 3, 4, 5, 6, faces_block1] / trialduration = 5000 / validresponse = (1, 2, 3, 4, 5, 6, Hap1, Hap2, Hap3, Hap4, Hap5, Hap6) / ontrialend = [values.face = picture.faces_block1.currentitem; if (trial.makeHappiness.response == "Hap1" ||trial.makeHappiness.response == "1") {values.makeHappiness = 1;} else if (trial.makeHappiness.response == "Hap2" ||trial.makeHappiness.response == "2") {values.makeHappiness = 2} else if (trial.makeHappiness.response == "Hap3" ||trial.makeHappiness.response == "3") {values.makeHappiness = 3} else if (trial.makeHappiness.response == "Hap4" ||trial.makeHappiness.response == "4") {values.makeHappiness = 4} else if (trial.makeHappiness.response == "Hap5" ||trial.makeHappiness.response == "5") {values.makeHappiness = 5} else if (trial.makeHappiness.response == "Hap6" ||trial.makeHappiness.response == "6") {values.makeHappiness = 6} else {values.makeHappiness = 0} if (trial.makeHappiness.response == "0") {values.missHappiness = 1;} else {values.missHappiness = 0}; values.race = list.race_block1.nextvalue] / posttrialpause = parameters.ISI </trial>
<trial makeFAMS> / inputdevice = mouse / ontrialbegin = [values.trialCount += 1] / stimulusframes = [1 = clearscreen, FamQuestion, Fam1, Fam2, Fam3, Fam4, Fam5, Fam6, 1, 2, 3, 4, 5, 6, faces_block2] / trialduration = 3000 / validresponse = (1, 2, 3, 4, 5, 6, Fam1, Fam2, Fam3, Fam4, Fam5, Fam6) / ontrialend = [values.face = picture.faces_block2.currentitem; if (trial.makeFAMS.response == "Fam1" ||trial.makeFAMS.response == "1") {values.makeFAMS = 1;} else if (trial.makeFAMS.response == "Fam2" ||trial.makeFAMS.response == "2") {values.makeFAMS = 2} else if (trial.makeFAMS.response == "Fam3" ||trial.makeFAMS.response == "3") {values.makeFAMS = 3} else if (trial.makeFAMS.response == "Fam4" ||trial.makeFAMS.response == "4") {values.makeFAMS = 4} else if (trial.makeFAMS.response == "Fam5" ||trial.makeFAMS.response == "5") {values.makeFAMS = 5} else if (trial.makeFAMS.response == "Fam6" ||trial.makeFAMS.response == "6") {values.makeFAMS = 6} else {values.makeFAMS = 0} if (trial.makeFAMS.response == "0") {values.missFams = 1;} else {values.missFams = 0}; values.race = list.race_block2.nextvalue] / posttrialpause = parameters.ISI </trial>
------------------------------------------------------------------------------------------ ****** INSTRUCTIONS ------------------------------------------------------------------------------------------ <item Instructions> / 1 = "1 Welcome.png" / 2 = "2 BackgroundInfo.png" / 3 = "3 HapInstr1.png" / 4 = "4 HapInstr2.png" / 5 = "5 FamInstr1.png" / 6 = "6 FamInstr2.png" </item>
<picture InstructionsDisplay> / items = Instructions / select = sequence / size = (100%, 100%) / position = (50%, 50%) </picture>
<picture WelcomeScreen> / items = Instructions / select = sequence / size = (100%, 100%) / position = (50%, 50%) </picture>
<trial Instructions> / stimulusframes = [1 = InstructionsDisplay, ContinueButton] / ontrialbegin = [values.instructnum += 1] / inputdevice = mouse / validresponse = (ContinueButton) / posttrialpause = parameters.ISI </trial>
<text ContinueButton> / items = ("Continue >>") / position = (90%, 87%) / fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1) / txcolor = (black) / txbgcolor = (white) / size = (10%, 8%) / vjustify = center </text>
------------------------------------------------------------------------------------------ ****** HAPPINESS ------------------------------------------------------------------------------------------ <item HappinessQuestion> /1 = "Rate how happy you think this face is" </item>
<text HappinessQuestion> /items = HappinessQuestion / position = (50, 70) / txcolor = (white) / txbgcolor = black / fontstyle = ("Arial", 3.0%, true, false, false, false, 5, 1) </text>
<text Hap1> / items = ("Definitely Unhappy") / position = (15%, 85%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (white) / txbgcolor = (black) / size = (12%, 5%) / vjustify = center </text>
<text Hap2> / items = ("Somewhat Unhappy") / position = (29%, 85%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (white) / txbgcolor = (black) / size = (12%, 5%) / vjustify = center </text>
<text Hap3> / items = ("Maybe Unhappy") / position = (43%, 85%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (white) / txbgcolor = (black) / size = (10%, 5%) / vjustify = center </text>
<text Hap4> / items = ("Maybe Happy") / position = (57%, 85%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (white) / txbgcolor = (black) / size = (10%, 5%) / vjustify = center </text>
<text Hap5> / items = ("Somewhat Happy") / position = (71%, 85%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (white) / txbgcolor = (black) / size = (12%, 5%) / vjustify = center </text>
<text Hap6> / items = ("Definitely Happy") / position = (85%, 85%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (white) / txbgcolor = (black) / size = (12%, 5%) / vjustify = center </text>
------------------------------------------------------------------------------------------ ****** FAMILIARITY ------------------------------------------------------------------------------------------ <item FamQuestion> /1 = "Rate your familiarity with this topic" </item>
<text FamQuestion> /items = FamQuestion / position = (50, 70) / txcolor = (white) / txbgcolor = black / fontstyle = ("Arial", 3.0%, true, false, false, false, 5, 1) </text>
<text Fam1> / items = ("Definitely Unfamiliar") / position = (15%, 85%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (white) / txbgcolor = (black) / size = (12%, 5%) / vjustify = center </text>
<text Fam2> / items = ("Somewhat Unfamiliar") / position = (29%, 85%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (white) / txbgcolor = (black) / size = (12%, 5%) / vjustify = center </text>
<text Fam3> / items = ("Maybe Unfamiliar") / position = (43%, 85%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (white) / txbgcolor = (black) / size = (10%, 5%) / vjustify = center </text>
<text Fam4> / items = ("Maybe Familiar") / position = (57%, 85%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (white) / txbgcolor = (black) / size = (10%, 5%) / vjustify = center </text>
<text Fam5> / items = ("Somewhat Familiar") / position = (71%, 85%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (white) / txbgcolor = (black) / size = (12%, 5%) / vjustify = center </text>
<text Fam6> / items = ("Definitely Familiar") / position = (85%, 85%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (white) / txbgcolor = (black) / size = (12%, 5%) / vjustify = center </text>
------------------------------------------------------------------------------------------ ****** GENERAL CONTINUE 7 LIKERT ------------------------------------------------------------------------------------------ <text NextButton> / items = ("Next >>") / position = (50%, 50%) / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / txcolor = (black) / txbgcolor = (white) / size = (10%, 10%) / vjustify = center </text>
<text 1> / items = ("1") / position = (15%, 80%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (black) / txbgcolor = (white) / size = (5%, 5%) / vjustify = center </text>
<text 2> / items = ("2") / position = (29%, 80%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (black) / txbgcolor = (white) / size = (5%, 5%) / vjustify = center </text>
<text 3> / items = ("3") / position = (43%, 80%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (black) / txbgcolor = (white) / size = (5%, 5%) / vjustify = center </text>
<text 4> / items = ("4") / position = (57%, 80%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (black) / txbgcolor = (white) / size = (5%, 5%) / vjustify = center </text>
<text 5> / items = ("5") / position = (71%, 80%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (black) / txbgcolor = (white) / size = (5%, 5%) / vjustify = center </text>
<text 6> / items = ("6") / position = (85%, 80%) / fontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (black) / txbgcolor = (white) / size = (5%, 5%) / vjustify = center </text>
------------------------------------------------------------------------------------------ ****** LISTS - BLOCK 1 ------------------------------------------------------------------------------------------
<picture faces_block1> / items = ("face1.jpg", "face2.jpg", "face3.jpg", "face4.jpg", "face5.jpg", "face6.jpg", "face7.jpg", "face8.jpg", "face9.jpg", "face10.jpg", "face11.jpg", "face12.jpg", "face13.jpg", "face14.jpg", "face15.jpg", "face16.jpg") / size = (60%, 60%) / position = (50, 32) / select = noreplace / erase = false </picture>
<list race_block1> / items = ("white", "white", "hispanic", "white", "African American", "Asian", "African American", "Asian", "white", "white", "white", "hispanic", "Native Hawaiian", "African American", "Asian", "African American") / selectionmode = picture.faces_block1.currentindex </list>
------------------------------------------------------------------------------------------ ****** LISTS - BLOCK 2 ------------------------------------------------------------------------------------------ <picture faces_block2> / items = ("face1.jpg", "face2.jpg", "face3.jpg", "face4.jpg", "face5.jpg", "face6.jpg", "face7.jpg", "face8.jpg", "face9.jpg", "face10.jpg", "face11.jpg", "face12.jpg", "face13.jpg", "face14.jpg", "face15.jpg", "face16.jpg") / size = (60%, 60%) / position = (50, 32) / select = noreplace / erase = false </picture>
<list race_block2> / items = ("white", "white", "hispanic", "white", "African American", "Asian", "African American", "Asian", "white", "white", "white", "hispanic", "Native Hawaiian", "African American", "Asian", "African American") / selectionmode = picture.faces_block2.currentindex </list>
------------------------------------------------------------------------------------------ ****** INSTRUCTION COMPREHENSION CHECK PART 1 ------------------------------------------------------------------------------------------
<surveypage HapInstrCompQ> / caption = "Please answer the following questions" / questions = [1 = HapCompCheck1, HapCompCheck2, HapCompCheck3] / responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 0) / itemfontstyle = ("Arial", 2%, false, false, false, false, 5, 0) / itemspacing = 5% / showpagenumbers = false / navigationbuttonfontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1) / navigationbuttonsize = (10%, 8%) / nextbuttonposition = (85%, 85%) / showbackbutton=false / showquestionnumbers = false / branch = [if (radiobuttons.HapCompCheck1.response != "Level of Happiness" || radiobuttons.HapCompCheck2.response != "Faces" || radiobuttons.HapCompCheck3.response != "4 seconds") block.Happiness] </surveypage>
<radiobuttons HapCompCheck1> / caption="What ratings will you be making?" / options=( "Level of Happiness", "Level of Abstractness", "Level of Enjoyment") / required=true </radiobuttons>
<radiobuttons HapCompCheck2> / caption="What will you be looking at?" / options=( "Faces", "Landscape", "Aeroplanes") / required=true </radiobuttons>
<radiobuttons HapCompCheck3> / caption="How many seconds will you have to make a judgement?" / options=( "4 seconds", "40 seconds", "there is no time limit") / required=true </radiobuttons>
------------------------------------------------------------------------------------------ ****** INSTRUCTION COMPREHENSION CHECK PART 2 ------------------------------------------------------------------------------------------
<surveypage FamInstrCompQ> / caption = "Please answer the following questions" / questions = [1 = FamCompCheck1, FamCompCheck2, FamCompCheck3] / responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 0) / itemfontstyle = ("Arial", 2%, false, false, false, false, 5, 0) / itemspacing = 5% / showpagenumbers = false / navigationbuttonfontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1) / navigationbuttonsize = (10%, 8%) / nextbuttonposition = (85%, 85%) / showbackbutton=false / showquestionnumbers = false / branch = [if (radiobuttons.FamCompCheck1.response != "Level of Familiarity" || radiobuttons.FamCompCheck2.response != "Faces" || radiobuttons.FamCompCheck3.response != "5 seconds") block.Familiarity] </surveypage>
<radiobuttons FamCompCheck1> / caption="What ratings will you be making?" / options=( "Level of Familiarity", "Level of Happiness", "Level of Enjoyment") / required=true </radiobuttons>
<radiobuttons FamCompCheck2> / caption="What will you be looking at?" / options=( "Animals", "Houses", "Faces") / required=true </radiobuttons>
<radiobuttons FamCompCheck3> / caption="How many seconds will you have to make a judgement?" / options=( "3 seconds", "20 seconds", "there is no time limit") / required=true </radiobuttons>
|