Reply To: Comprehension questions for some test items in the following?

PennController for IBEX Forums Support Comprehension questions for some test items in the following? Reply To: Comprehension questions for some test items in the following?

#7400
Jeremy
Keymaster

Hi,

You can include a column named FOLLOWUP in your file experiment-pg-norming.csv which you leave empty for the items where you don’t want a follow-up question, and which you fill with your follow-up question for the other items. Then you can do this:

Template("experiment-pg-norming.csv", row =>
    newTrial( "experiment-"+row.TYPE,
        newText("sentence", row.SENTENCE)
            .cssContainer({"margin-top":"2em", "margin-bottom":"2em"})
            .center()
            .print()
        ,
        // 7-point scale
        newScale(7)
            .before( newText("left", "<div class='fancy'>(very unnatural)</div>") )
            .after( newText("right", "<div class='fancy'>(very natural)</div>") )
            .labelsPosition("top")
            .keys()
            .log()
            .once()
            .color("LightCoral")
            .center()
            .print()
            .wait()
        ,
        // Wait briefly to display which option was selected
        newTimer("wait", 300)
            .start()
            .wait()
        ,
        clear()
        ,
        ...(row.FOLLOWUP ? [
            newText("follow-up", row.FOLLOWUP)
                .cssContainer({"margin-top":"2em", "margin-bottom":"2em"})
                .center()
                .print()
            ,
            newScale("answer-follow-up", "Yes", "No")
                .button()
                .print()
                .wait()
        ] : [
            null
        ])
    )
)

Jeremy

  • This reply was modified 1 year, 3 months ago by Jeremy. Reason: added the missing ]