Responsetrial depending on variable correct response


Author
Message
Lizzy
Lizzy
Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)
Group: Forum Members
Posts: 25, Visits: 104
Hi,

I'm creating a task in which each trial requires a sequence of responses, which I'm building using responsetrials.
The structure is like this:
1. Show text, including one word with missing letters. when participants know what the missing letter is, they press the spacebar.
2. Show only the word with missing letters, require participants to enter the first missing letter (openended trial).
3. When the letter entered is the correct letter, show the full word and "correct"; when the entered letter is not the correct letter, show the full word and "incorrect'
4. Present a comprehension question about the text which requires yes ("y") or no ("n") answer

I'm having problems with step 3, because the correct letter changes on every trial. I've defined this in a counter element that I've linked to the list of texts to be presented.

This is the trial script:

<trial Step1>
/ stimulustimes = [1 = A1_TS1; 500 = A1_TS2; 1000 = A1_Fragment1]
/ inputdevice = keyboard
/ validresponse = (57)
/ timeout = 100000
/ beginresponsetime = 1000
/ responsetrial = (57,Step2)
</trial>

<openended Step2>
/ stimulusframes = [1=A1_Fragment1]
/ position = (50%, 55%)
/ required = true
/ validresponse = (anyresponse)
/ size = (100, 20)
/ mouse = true
/ charlimit = 1
/ iscorrectresponse = [trial.Step2.response == counter.Assessment1Rotation1Resp.selectedvalue]
/ responsetrial = (DONT KNOW WHAT TO PUT HERE, TrialCorrect_FB)
/ responsetrial = (anyresponse, TrialIncorrect_FB)
</openended>

<trial TrialCorrect_FB>
/ stimulusframes = [1=RevealText, correcttext]
/validresponse = (noresponse)
/ timeout = 1000
/ responsetrial = (noresponse,Step4)
</trial>

<trial TrialIncorrect_FB>
/ stimulusframes = [1=RevealText, errortext]
/validresponse = (noresponse)
/ timeout = 1000
/ responsetrial = (noresponse, Step4)
</trial>

<trial Step4>
/ stimulusframes = [1=A1_CQText, yes]
/ inputdevice = keyboard
/ validresponse = ("y", "n")
/ iscorrectresponse = [trial.A1_CQl.response == counter.Assessment1Rotation1ComprehensionResp.selectedvalue]
/ correctmessage = true(correcttext, 1000)
/ errormessage = true(errortext, 1000)
</trial>

I know that the value of the response in the responsetrial attribute needs to be a valid response value, but unfortunately I cannot specify something along the lines of 'correctresponse' there.

Is there any way I can store the selected value in my counter Assessment1Rotation1Resp somewhere and refer to it in my responsetrial attribute?

Or, is there another way I can present both the full word and the error/correct message using other script? I've looked at /errormessage but couldn't figure out how to present two text elements this way.
Any pointers on how to solve this would be much appreciated!

Cheers
Lizzy
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
You should not use the simplistic /responsetrial attribute for this. Use the more flexible /branch attribute as in

<openended Step2>
...
/ iscorrectresponse = [openended.Step2.response == counter.Assessment1Rotation1Resp.selectedvalue]
/ branch = [if (openended.Step2.correct) trial.TrialCorrect_FB else trial.TrialIncorrect_FB]
...
</openended>

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search