PennController for IBEX › Forums › Support › Re-reading sentences in the SPR option
- This topic has 4 replies, 2 voices, and was last updated 2 years, 5 months ago by
maria.goldshtein.
-
AuthorPosts
-
August 19, 2022 at 9:36 pm #8345
maria.goldshtein
ParticipantHello,
I was wondering whether it is possible to set up the prefab SPR design to have an option to re-read a sentence (once). Meaning, at the end of a sentence, to have two options: to re-read the sentence or to move to a comprehension question. If a participant chooses to re-read the sentence, after re-reading they will not be able to re-read it additional times.
Is this possible? Do you have any advice on how to go about that?
Thanks in advance!
August 20, 2022 at 7:36 pm #8346Jeremy
KeymasterHello,
Assuming you use the native DashedSentence and Question controllers, you could embed them in a PennController trial like this:
newTrial( newController("1stpass", "DashedSentence", {s: "This is a dummy sentence"}).log().print().wait().remove() , newCanvas("buttonContainer", "30em", "1em") .add( 0 , 0 , newButton("Continue") ) .add( "right at 100%" , 0 , newButton("Read the sentence again").callback( clear() , newController("2ndpass", "DashedSentence", {s: "This is a dummy sentence"}) .log().print().wait().remove() , getButton("Continue").click() ) ) .center() .print() , getButton("Continue").wait() , clear() , newController("Question", {as: ["Yes","No"], q: "Was the sentence felicitous?"}).log().print().wait() )
Jeremy
August 25, 2022 at 10:56 pm #8365maria.goldshtein
ParticipantThank you! I will try this out.
Should this just go at the end of the existing trial code? (I do mean the native controllers)
August 26, 2022 at 1:02 pm #8366Jeremy
KeymasterHi,
I am not sure how to answer your question. What does your code currently look like? Are you using native controllers? If so, are you inserting them inside a PennController trial (
newTrial( /* ... */ newController
) or are you using native-Ibex syntax (items = [ [ // ...
)?The code from my previous message is just an example: it generates one (unlabeled) trial where you can read a self-paced sentence once or twice before finishing the trial. You can start a new empty project on the farm and paste the code in the editor just below
PennController.ResetPrefix()
to try itJeremy
August 26, 2022 at 2:49 pm #8368maria.goldshtein
ParticipantI understand. I have not written code yet, I am just getting set up to do so, and planning to use the native controllers.
-
AuthorPosts
- You must be logged in to reply to this topic.