Reply To: Lists randomization

PennController for IBEX Forums Support Lists randomization Reply To: Lists randomization

#9585
rsw123
Participant

Many thanks for the link! I got the idea.

But before continue to the randomization step, I tried to run the following script and it returned the error message “Alert from preview: ERROR: There must be some items in the running order!” Things went well before adding the “practice” part. Could you please give me some hints on what happening here? (the demo link also attached here: https://farm.pcibex.net/r/QzMAyX/)

// Remove command prefix
PennController.ResetPrefix(null)

// Control trial sequence
Sequence("information", "consent", "consentform", "demographic", "instructions", "practice", randomize("experimental-trial"), "send", "completion_screen")

// Information sheet
newTrial("information",
    newHtml("informationsheet", "informationsheet.html")
        .cssContainer({"width":"720px"})
        .print()
    ,
    newButton("continue", "Click here to continue")
        .center()
        .print()
        .wait(getHtml("informationsheet").test.complete()
        )
)

// Consent info
newTrial("consent",
    newHtml("consent", "consent.html")
        .cssContainer({"width":"720px"})
        .checkboxWarning("You must consent before continuing.")
        .print()
    ,
    newButton("continue", "Click here to continue")
        .center()
        .print()
        .wait(getHtml("consent").test.complete()
                  .failure(getHtml("consent").warn())
        )
)

// Consent form
newTrial("consentform",
    newHtml("consentform", "consentform.html")
        .cssContainer({"width":"720px"})
        .checkboxWarning("You must consent before continuing.")
        .print()
    ,
    newButton("I consent to items above")
        .center()
        .print()
        .wait(getHtml("consentform").test.complete()
                  .failure(getHtml("consentform").warn())
        )
)

// demographic
newTrial("demographic",
    newHtml("demographic", "demographic.html")
        .cssContainer({"width":"720px"})
        .checkboxWarning("You must consent before continuing.")
        .print()
    ,
    newButton("continue", "Click here to continue")
        .center()
        .print()
        .wait(getHtml("demographic").test.complete()
                  .failure(getHtml("demographic").warn())
        )
)

// instructions
newTrial("instructions",
    newHtml("instructions", "instructions.html")
        .cssContainer({"width":"720px"})
        .checkboxWarning("You must consent before continuing.")
        .print()
    ,
    newButton("continue", "Click here to continue")
        .center()
        .print()
        .wait(getHtml("instructions").test.complete()
                  .failure(getHtml("instructions").warn())
        )
)

// practice
newTrial("practice",
    // will print all Text elements, horizontally centered
    defaultText.center().print()
    ,
    newText("Practice Session")
    ,
    newText("You will now be given eight practice trials to familiarize yourself with the experiment. During the practice trials, you will receive feedbacks on whether you recreate the pattern correctly and on whether your decision about the object is correct.")
    ,
    newText("Please press 1 if the object has been mentioned in the preceding sentence, or press 2 if has not been mentioned.")
    ,
    newText("You should do this as quickly and accurately as possible.")
    ,
    newText("When you are ready, press C to start a practice run.")
    ,
    newKey("keypress", "C")
    .wait()  // Finish trial upon press on c
)