Comprehension Questions and Fillers

PennController for IBEX Forums Support Comprehension Questions and Fillers

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5677
    es19488
    Participant

    Hi,
    I’m trying to run a simple SPR experiment with a number of items, each accompanied by a comprehension question. I also wish to add fillers.
    Here’s my problem:I wish for every comprehension question to appear after the last region of every item has been read, but no matter what I do, I get the comprehension question alongside every region of my experimental sentences. Could you help me to get this right please? And could you also help me with the fillers? I wish to add comprehension questions for only a limited number of fillers.

    Here’s my code:

    newTrial( "welcome" ,
        newText("<p>Welcome!</p>")
            .print()
        ,
        newText("<p>In this experiment, you will read sentences and will be asked questions.</p>")
            .print()
        ,
        newText("<p>Please enter your full name and then click the button below to start the experiment.</p>")
            .print()
        ,
        newTextInput("inputID")
            .print()
        ,
        newButton("Start")
            .print()
            .wait()
        ,
        newVar("ID")
            .global()
            .set( getTextInput("inputID") )
    )
    .log( "ID" , getVar("ID") )
    
    Template( variable => 
      newTrial( "experiment" ,
         newText(variable.Description)
            .settings.css("font-size", "25") // this changes font size
            .print()
         ,
         newKey(" ")
            .wait()
         ,
         newText( variable.Questions).print()
         ,
         newText( "answer1" , variable.answer1 ).print() ,
         newText( "answer2" , variable.answer2 ).print() 
         ,
         newSelector("answer").add( getText("answer1") , getText("answer2") ).log().wait()
      )
      .log( "correct" , variable.correct )
      .log( "Group" , variable.Group )
      .log( "ID"     , getVar("ID")    )
      .log( "Item"   , variable.Item   )
      .log( "Region" , variable.Regions )
      .log( "Attachment"  , variable.Attachment  )
    )
    
    SendResults( "send" )
    
    newTrial( "final" ,
        newText("<p>Thank you for your participation!</p>")
            .print()
        ,
        newText("<p>Click here to validate your participation.</p>")
            .print()
        ,
        newButton("void")
            .wait()
    )
    #5679
    Jeremy
    Keymaster

    Hi,

    Right now, your code looks up every row from your table and for every single one of them, it outputs one corresponding trial presenting the value of the Description column onto the page, waiting for a keypress on the spacebar, and showing the values of the answer1 and answer2 column, waiting for a click on one of them. Once a click happens, it goes to the next trial, ie. the next row, and it does all of this all over again. This is how the Template command works.

    From the description of your problem, I am guessing that you split each of your items across several rows in your table, and that you want each row’s Description corresponding to the same item to appear on the screen one at a time, moving on to the next one by pressing the spacebar. Then you want to show the Question(s?) along with answer1 and answer2. Did I get it right?

    If what I described is what you want to do, you need to use the Controller element, using DashedSentence with the option display set to "in place"—you’d also need to make sure your table has the right format. Here is an example of how to implement what I described, adding the subtlety of optional questions:

    AddTable("myTable", `Item,Sentence,Question,answer1,answer2
    1,This_is_region1_of_item1 and_this_is_region2_of_item1,Question for item 1,Answer1 for item1,Answer2 for item1
    2,This_is_region1_of_item2 and_this_is_region2_of_item2,,,
    3,This_is_region1_of_item3 and_this_is_region2_of_item3,Question for item 3,Answer1 for item3,Answer2 for item3`)
    
    Template( variable => 
      newTrial( "experiment" ,
        newController("DashedSentence", {s: variable.Sentence, display: "in place", hideUnderscores: true})
            .print()
            .log()
            .wait()
            .remove()
        ,
        ( variable.Question ? [
           newText( variable.Question ).print()
           ,
           newText( "answer1" , variable.answer1 ).print() ,
           newText( "answer2" , variable.answer2 ).print() 
           ,
           newSelector("answer").add( getText("answer1") , getText("answer2") ).log().wait()
        ] : [
            null
        ])
      )
      .log( "Item"   , variable.Item   )
    )

    Jeremy

    #5682
    es19488
    Participant

    Thank you for your repose. Now it seems like there’s no problem with the comprehension questions, but strangely enough, running your code, I get no results! My results file is empty even though I’ve refreshed it and run through the experiment several times.

    In addition, I’m still facing difficulty with including the fillers. I’m not going to include a comprehension question after every filler (out of concern that this would lead to a very exhausting experiment), but I still would like to add comprehension questions to some of them. Could you please help me with this as well?

    Thank you

    #5685
    Jeremy
    Keymaster

    Hi,

    You results file should not be empty, even if the trial fail to record the relevant bits: you should at least have a report that a run took place. Did you make sure to take your experiment until the end (ie. until you get a confirmation message: “The results were successfully sent to the server. Thanks!”)?

    The code above already includes a trial without a comprehension question, namely trial 2. As you can tell from the table, you just leave the Question column empty and it will skip that bit. So just don’t write anything into Question in the rows of your filler table where you don’t want a comprehension question to appear

    Jeremy

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.