Trial templates & tables

PennController for IBEX Forums Support Trial templates & tables

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #4048
    Mogli
    Participant

    Hey,

    I tried to create a table as following example:

    List,Block,Item,expSet,grammaticallycorrect,SocStat_context,SocStat_contextVers,Sentence
    2,1,9,SocStat,yes,high,1,Ich denke, du bist gross.
    2,1,10,SocStat,yes,high,1,Ich Du weißt, er ist reich.
    2,1,11,SocStat,yes,high,1,Sie fühlt sich gut.
    2,1,12,SocStat,yes,high,1,Wir gehen gerne spazieren.
    2,1,13,SocStat,yes,high,2,Das Wetter ist schön.

    My Items are the last sentences, so I tried the following command:

    PennController.Template(
      variable => PennController(
      
        newText(variable.Sentence)
            .print()
       
      )
       .log( “grammaticallycorrect”  , variable.grammaticallycorrect  )
    )

    I put “.log( “grammaticallycorrect”  , variable.grammaticallycorrect  )” to see in results wich condition the participant has evaluated.

    I think there is something I do not understand, because It does not work. I tried it in a few ways but I just does not work. Moreover I need three slides after every Item.

    Do you have any solution? It would be great, if you could help me.

    Thank you

    Kind regards

    #4049
    Jeremy
    Keymaster

    Hi!

    This code works just fine for me:

    Note that I added a button on which to click so that each trial doesn’t end as soon as it starts, and I replaced the commas in your sentence with , so they don’t get misinterpreted as separating cells.
    I do see “yes” in my results file for all the trials (since it is the only value for grammaticallycorrect in your table).

    Let me know if you have questions

    Jeremy

    #4050
    Mogli
    Participant

    Hey Jeremy,

    Thank you so much, it works!

    the list I have sent you has originally 172 items. I created a csv file and uploaded it to chunk_includes.
    In your example you added the list directly to PennController, do I understand it right?

    Kind regards

    Mogli

    #4052
    Jeremy
    Keymaster

    Hi Mogli,

    Sorry for the late reply. In my example I use the command AddTable as a way to add a table directly from the script. This way, it should work no matter what table you have uploaded to your project otherwise.

    You can indeed delete the AddTable bit from the code I posted, and upload a CSV file instead as you mention. Just make sure to use the appropriate name to refer to your table in Template (or you can also just not refer to your table at all there if you updated only one).

    Jeremy

    #4057
    Mogli
    Participant

    Hey Jeremy

    It works perfectly and is much easier that way. But there is one problem left: If I replace the commas in the cvs-file in the sentences like you did (&\#44;), it gets not interpreted like a comma. Instead it shows: „Ich befürchte&\#44; dass die Strecke wegen des frühen Rennens umgeleitet ist.“
    And if I write a normal comma it gets misinterpreted and Ibex shows just the first two words. Do you have a solution for that?

    Thank you a lot for your help.

    Mogli

    #4058
    Jeremy
    Keymaster

    Hey Mogli,

    I only inserted the backslash symbol because otherwise the forums would have printed a real comma in my code examples and that would have defeated my purposes. You can try without the backslash symbol, or with %2C instead.

    Alternatively, if you use a spreadsheet editor to modify your CSV file, you can try using normal commas in your sentences, but quote your text cells. In LibreOffice Calc for example, you can check “Edit filter settings” when saving your file and then you will be prompted with an option window where you can check “Quote all text cells.” Maybe that would work.

    Jeremy

    #4059
    Mogli
    Participant

    Now it works.

    One last question:

    I have 3 slides after every Item; Is there a possibility to show one slide after another? That the participant click the first slide, than it disappears and the next one comes up, and than the same for the last?

    These are my slides:

    newText(“Skala2”, “Wie akzeptabel finden Sie den Satz?”)
    .print()

    ,

    newCanvas(“empty canvas6”, 1, 40)
    .print()

    ,

    newScale(“akzeptabilität”, 7)
    .settings.before( newText(“left1”, “1 <br /> (am unakzeptabelsten)”) )
    .settings.after( newText(“right2”, “7 <br /> (am akzeptabelsten)”) )
    .settings.slider()
    .print()
    .settings.log()
    .wait()

    ,

    newCanvas(“empty canvas5”, 1,40)
    .print()

    ,

    newCanvas(“empty canvas11”, 1, 40)
    .print()

    ,

    newText(“Skala3”, “Würden Sie den Satz selbst schreiben?”)
    .print()

    ,

    newCanvas(“empty canvas7”, 1,40)
    .print()

    ,

    newScale(“Würden Sie den Satz selbst schreiben?1”, 7)
    .settings.before( newText(“left3”, “1 <br /> (nein)”) )
    .settings.after( newText(“right3”, “7 <br /> (ja)”) )
    .settings.slider()
    .print()
    .settings.log()
    .wait()

    )

    #4060
    Jeremy
    Keymaster

    You probably want to use the remove command. For example:

      newScale("akzeptabilität", 7)
        .settings.before( newText("left1", "1 
    (am unakzeptabelsten)") ) .settings.after( newText("right2", "7
    (am akzeptabelsten)") ) .settings.slider() .print() .settings.log() .wait() .remove() , getText("Skala2") .remove()
    #4064
    Mogli
    Participant

    Thank you again.

    I tried a few commands to have something like a time-out, but it does not work. It means if a participant is not fast enough to klick the slide (e.g. longer than 4 sec) I want to skip to the next slide. Is all this together possible?

    Furthermore, if I run the experiment, there is always the little PennController window in the corner right, is it possible to avoid this?

    #4065
    Jeremy
    Keymaster

    You can turn off the debugger using PennController.DebufOff() in your script (e.g. place it at the very top or at the very bottom). I would recommend keeping it on until you’re ready to publish your experiment though, as it can provide you with very useful messages in case of errors.

    It is possible to code a timeout, but it’s not entirely straightforward as it means that the trial has two possible outcomes when, usually, the single outcome is “selection happens.” What you can do is launch a 4s timer and wait for it to end, and tell your slider to end your timer early when selection happens.
    Now, I just realized that PennController 1.3 introduced a bug with timer.stop so we’ll need a little trick: we’ll create a button that we never print, and we’ll wait for a click on it and make both the slider and the timer click it:

    #4083
    Mogli
    Participant

    Hey Jeremy,

    unfortunately the slide does not disappear after clicking it or after the timer has expired. Is there a way to solve this?

    Kind regards

    Mogli

    #4086
    Jeremy
    Keymaster

    Hi Mogli,

    Did you add the command getScale("akzeptabilität").remove() after the wait command on the button?

    Jeremy

    #4096
    Mogli
    Participant

    Now everything is fine. Thank you!

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