Trials are unintentionally skipped

PennController for IBEX Forums Support Trials are unintentionally skipped

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #7044
    Valerie
    Participant

    Hi Jeremy,

    I have an experiment in which I specify a sequence of trials:

    Sequence( "preloadImages", "consent", "codename", "welcome", "instructions CPT 1", "CPT_Practice", "instructions CPT 2", randomize("CPT") , "break", "instructions AJT 1", "practice 1", "comment AJT practice 1", "practice 2", "comment AJT practice 2", "practice 3", "comment AJT practice 3", "practice 4", "comment AJT practice 4","instructions AJT 2", randomize("AJT"), "LBQ.Intro", "LBQ", "LBQ2", "LBQ3", "send", "code", "final" )

    Everything works just fine up to "LBQ.Intro". After the trial is completed, the results are sent to the server and the remaining trials “LBQ”, “LBQ2”, “LBQ3”, “code”, and “final” are skipped.

    Below is the code for the trials “LBQ.Intro”, “LBQ”, “LBQ2”, “LBQ3”, “send”, “code”, and “final” (I aplogize for the length, but I thought it might be helpful). Any idea why those trials might be skipped?

    // This is the LBQ Intro + whether they know what the experiment was about.
    newTrial( "LBQ.Intro",
             defaultText
                .settings.css("padding-left", "5px")
                .settings.css("padding-right", "5px")
                .settings.css("font-size", "1.2em")
                .print()
            ,
             defaultTextInput
                .settings.css("padding-left", "5px")
                .settings.css("padding-right", "5px")
                .settings.css("font-family", "Times New Roman")
                .settings.css("font-size", "1.2em")
                .print()
            ,
            newText("<u><b>Language Background Questionnaire</b></u>")
                .center()
                .print()
            ,
            newText("<p>This questionnaire is designed to give us a good understanding of you and your language background, among other things. The information you provide is confidential. Please fill in the information to the best of your ability. If there are items that do not apply to you, feel free to leave them blank.</p>")
                .print()
            ,
            newText("<p>Do you have any ideas of what the experiment was about?</p>")
                .print()
            ,
            newTextInput("Q1", "")
                .lines(0)
                .size(700, 200)
                .print()
                .log()
            ,
            newCanvas("blankspace", 1500, 25)
                .print()
            ,
            newButton("continue", "Continue")
            .center()
            .settings.css("font-family", "Times New Roman")
            .settings.css("font-size", "1.2em")
            .print()
            .wait()
    )
    
    // This is the LBQ.
    newTrial( "LBQ",
             defaultText
                .settings.css("padding-left", "5px")
                .settings.css("padding-right", "5px")
                .settings.css("font-size", "1.2em")
                .print()
            ,
             defaultTextInput
                .settings.css("padding-left", "5px")
                .settings.css("padding-right", "5px")
                .settings.css("font-family", "Times New Roman")
                .settings.css("font-size", "1.2em")
                .print()
            ,
            defaultDropDown
                .settings.css("padding-left", "5px")
                .settings.css("padding-right", "5px")
                .settings.css("font-family", "Times New Roman")
                .settings.css("font-size", "1.2em")
                .print()
            ,
            newText("<u><b>Language Background Questionnaire</b></u>")
                .center()
                .print()
            ,
             newText("<p>Birth year:</p>")
                .print()
            ,
            newTextInput("Q2", "")
                .lines(0)
                .size(200, 50)
                .print()
                .log()
            ,
            newText("<p>Gender:</p>")
                .print()
            ,
            newTextInput("Q3", "")
                .lines(0)
                .size(200, 50)
                .print()
                .log()
            ,
            newText("<p>Racial or ethnic identity/identities:</p>")
                .print()
            ,
            newTextInput("Q4", "")
                .lines(0)
                .size(200, 50)
                .print()
                .log()
            ,
            newText("<p>Where were you born? Please list the country, state, and city and/or town.</p>")
                .print()
            ,
            newTextInput("Q5", "")
                .lines(0)
                .size(200, 50)
                .print()
                .log()
            ,
            newText("<p>Where did you grow up? Please list the country, state, and/or town. If you grew up in more than one place, please list all of them. If you have only one location, you can leave the others blank.</p>")
                .print()
            ,
            newCanvas("Q6.Location1", 1500, 100)
                .settings.add( 0, 0, newText("line 1", "<u>Location 1</u>") )
                .settings.add( 0, 25, newText("line 2", "Country") )
                .settings.add( 0, 50, newTextInput("Country1" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 175, 25, newText("line 2", "State") )
                .settings.add( 175, 50, newTextInput("State1" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 350, 25, newText("line 2", "City") )
                .settings.add( 350, 50, newTextInput("City1" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 525, 25, newText("line 2", "Age Range") )
                .settings.add( 525, 50, newTextInput("Age1" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .print()
            ,
            newCanvas("Q6.Location2", 1500, 100)
                .settings.add( 0, 0, newText("line 1", "<p><u>Location 2</u></p>") )
                .settings.add( 0, 40, newText("line 2", "Country") )
                .settings.add( 0, 65, newTextInput("Country2" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 175, 40, newText("line 2", "State") )
                .settings.add( 175, 65, newTextInput("State2" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 350, 40, newText("line 2", "City") )
                .settings.add( 350, 65, newTextInput("City2" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 525, 40, newText("line 2", "Age Range") )
                .settings.add( 525, 65, newTextInput("Age2" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .print()
            ,
            newText("<p></p>")
                .print()
            ,
            newCanvas("Q6.Location3", 1500, 100)
                .settings.add( 0, 0, newText("line 1", "<p><u>Location 3</u></p>") )
                .settings.add( 0, 40, newText("line 2", "Country") )
                .settings.add( 0, 65, newTextInput("Country3" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 175, 40, newText("line 2", "State") )
                .settings.add( 175, 65, newTextInput("State3" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 350, 40, newText("line 2", "City") )
                .settings.add( 350, 65, newTextInput("City3" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 525, 40, newText("line 2", "Age Range") )
                .settings.add( 525, 65, newTextInput("Age3" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .print()
            ,
            newText("<p></p>")
                .print()
            ,
            newText("<p>What region did you most associate with while growing up?</p>")
                .print()
            ,
            newTextInput("Q7", "")
                .lines(0)
                .size(700, 200)
                .print()
                .log()
            ,
             newText("<p>What (if any) other regions of the US have you lived in? Please list the states and/or towns. Feel free to leave blanks, where applicable. </p>")
                .print()
            ,
            newCanvas("Q8.Location1", 1500, 100)
                .settings.add( 0, 0, newText("line 1", "<u>Location 1</u>") )
                .settings.add( 0, 25, newText("line 2", "State") )
                .settings.add( 0, 50, newTextInput("State1" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 175, 25, newText("line 2", "City") )
                .settings.add( 175, 50, newTextInput("City1" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 350, 25, newText("line 2", "Age Range") )
                .settings.add( 350, 50, newTextInput("Age1" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .print()
            ,
            newCanvas("Q8.Location2", 1500, 100)
                .settings.add( 0, 0, newText("line 1", "<p><u>Location 2</u></p>") )
                .settings.add( 0, 40, newText("line 2", "State") )
                .settings.add( 0, 65, newTextInput("State2" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 175, 40, newText("line 2", "City") )
                .settings.add( 175, 65, newTextInput("City2" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 350, 40, newText("line 2", "Age Range") )
                .settings.add( 350, 65, newTextInput("Age2" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .print()
            ,
            newText("<p></p>")
                .print()
            ,
            newCanvas("Q8.Location3", 1500, 100)
                .settings.add( 0, 0, newText("line 1", "<p><u>Location 3</u></p>") )
                .settings.add( 0, 40, newText("line 2", "State") )
                .settings.add( 0, 65, newTextInput("State3" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 175, 40, newText("line 2", "City") )
                .settings.add( 175, 65, newTextInput("City3" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 350, 40, newText("line 2", "Age Range") )
                .settings.add( 350, 65, newTextInput("Age3" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .print()
            ,
            newText("<p></p>")
                .print()
            ,
            newCanvas("Q8.Location4", 1500, 100)
                .settings.add( 0, 0, newText("line 1", "<p><u>Location 4</u></p>") )
                .settings.add( 0, 40, newText("line 2", "State") )
                .settings.add( 0, 65, newTextInput("State4" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 175, 40, newText("line 2", "City") )
                .settings.add( 175, 65, newTextInput("City4" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 350, 40, newText("line 2", "Age Range") )
                .settings.add( 350, 65, newTextInput("Age4" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .print()
            ,
            newText("<p></p>")
                .print()
            ,
            newCanvas("Q8.Location5", 1500, 100)
                .settings.add( 0, 0, newText("line 1", "<p><u>Location 5</u></p>") )
                .settings.add( 0, 40, newText("line 2", "State") )
                .settings.add( 0, 65, newTextInput("State5" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 175, 40, newText("line 2", "City") )
                .settings.add( 175, 65, newTextInput("City5" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 350, 40, newText("line 2", "Age Range") )
                .settings.add( 350, 65, newTextInput("Age5" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .print()
            ,
            newText("<p></p>")
                .print()
            ,
            newText("<p>Please indicate the highest level of education that you have completed:</p>")
                .print()
            ,
            newDropDown("Q9", "Education Level")
                .settings.css("font-family", "Times New Roman")
                .settings.css("font-size", "1.2em")
                .add("Elementary School", "Middle School", "High School", "Some College", "College (BA/BS)", "Some Graduate School", "Graduate School (MA)", "Graduate School (PhD, MD, MJ)")
                .select("Elementary School")
                .print()
                .log()
            ,
            newText("<p>What do you consider your native language(s)?</p>")
                .print()
            ,
            newTextInput("Q10", "")
                .lines(0)
                .size(200, 50)
                .print()
                .log()
            ,
            newText("<p>Have you ever been diagnosed with speech or hearing issues?</p>")
                .print()
            ,
            newDropDown("Q11", "Speech or hearing issues")
                .settings.css("font-family", "Times New Roman")
                .settings.css("font-size", "1.2em")
                .add("Yes", "No")
                .select("No")
                .print()
                .log()
            ,
            newText("<p>Which speech or hearing issues have you been diagnosed with? (If this does not apply to you, leave this blank.)</p>")
                .print()
            ,
            newTextInput("Q12", "")
                .lines(0)
                .size(700, 200)
                .print()
                .log()
            ,
            newText("<p>Please rate your abilities in the language(s) you know based on the categories below, on a scale of 1-5. A score of 1 is poor, 2 is limited, 3 is good, 4 is very good, and 5 is excellent. Feel free to leave blanks for anything that does not apply to you.</p>")
                .print()
            ,
            newCanvas("Q13.Language1", 1500, 100)
                .settings.add( 0, 0, newText("line 1", "<u>Language 1</u>") )
                .settings.add( 0, 25, newText("line 2", "Listening") )
                .settings.add( 0, 50, newTextInput("Listening1" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 175, 25, newText("line 2", "Speaking") )
                .settings.add( 175, 50, newTextInput("Speaking1" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 350, 25, newText("line 2", "Reading") )
                .settings.add( 350, 50, newTextInput("Reading1" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 525, 25, newText("line 2", "Writing") )
                .settings.add( 525, 50, newTextInput("Writing1" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .print()
            ,
            newCanvas("Q13.Language2", 1500, 100)
                .settings.add( 0, 0, newText("line 1", "<p><u>Language 2</u></p>") )
                .settings.add( 0, 40, newText("line 2", "Listening") )
                .settings.add( 0, 65, newTextInput("Listening2" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 175, 40, newText("line 2", "Speaking") )
                .settings.add( 175, 65, newTextInput("Speaking2" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 350, 40, newText("line 2", "Reading") )
                .settings.add( 350, 65, newTextInput("Reading2" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 525, 40, newText("line 2", "Writing") )
                .settings.add( 525, 65, newTextInput("Writing2" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .print()
            ,
            newText("<p></p>")
                .print()
            ,
            newCanvas("Q13.Language3", 1500, 100)
                .settings.add( 0, 0, newText("line 1", "<p><u>Language 3</u></p>") )
                .settings.add( 0, 40, newText("line 2", "Listening") )
                .settings.add( 0, 65, newTextInput("Listening3" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 175, 40, newText("line 2", "Speaking") )
                .settings.add( 175, 65, newTextInput("Speaking3" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 350, 40, newText("line 2", "Reading") )
                .settings.add( 350, 65, newTextInput("Reading3" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .settings.add( 525, 40, newText("line 2", "Writing") )
                .settings.add( 525, 65, newTextInput("Writing3" ,"") 
                    .size(150,50)
                    .print()
                    .log()
                    )
                .print()
            ,
            newText("<p></p>")
                .print()
            ,
            newText("<p>Apart from where you live, are there cities or towns that you spend a lot of time in? If so, please list them here. If not, feel free to leave this blank.</p>")
                .print()
            ,
            newTextInput("Q14", "")
                .lines(0)
                .size(700, 200)
                .print()
                .log()
            ,
            newText("<p>Have you noticed differences between the way people from your region talk and the way other people talk? If so, what kind of differences have you noticed? If not, feel free to leave this blank.</p>")
                .print()
            ,
            newTextInput("Q15", "")
                .lines(0)
                .size(700, 200)
                .print()
                .log()
            ,
            newText("<p>Is there anything else you would like to tell us about your language background, or how you use language?</p>")
                .print()
            ,
            newTextInput("Q16", "")
                .lines(0)
                .size(700, 200)
                .print()
                .log()
            ,
            newCanvas("blankspace", 1500, 25)
                .print()
            ,
            newButton("continue", "Continue")
            .center()
            .settings.css("font-family", "Times New Roman")
            .settings.css("font-size", "1.2em")
            .print()
            .wait()
    )
    
    //Judgments
    newTrial( "LBQ2" ,
        defaultText
            .settings.css("padding-left", "5px")
            .settings.css("padding-right", "5px")
            .settings.css("font-size", "1.2em")
            .print()
        ,
        defaultTextInput
            .settings.css("padding-left", "5px")
            .settings.css("padding-right", "5px")
            .settings.css("font-family", "Times New Roman")
            .settings.css("font-size", "1.2em")
        ,
        defaultDropDown
            .settings.css("padding-left", "5px")
            .settings.css("padding-right", "5px")
            .settings.css("font-family", "Times New Roman")
            .settings.css("font-size", "1.2em")
        ,
        newText("<u><b>Language Background Questionnaire</b></u>")
            .center()
            .print()
        ,
        newText("<p> Picture a situation where someone used to hate classical music but likes it now. Imagine them saying the following sentence: 'I listen to classical music anymore.' Indicate whether this sentence is: </p>")
            .print()
        ,
        newText("question", "")
        ,
        newDropDown("say", "a kind of sentence ...")
            .css("font-family", "Times New Roman")
            .css("font-size", "1.2em")
            .add("a kind of sentence you would definitely <b>say</b> in this situation", "a kind of sentence you might <b>say</b> in this situation", "a kind of sentence you would never <b>say</b> in this situation")
            .print()
            .log()
            .callback(
                self.test.selected("a kind of sentence you would never <b>say</b> in this situation")
                    .success( getText("question").text("<p>How might you hear this same idea expressed instead?</p>") )
                    .failure( getText("question").text("<p>In what kinds of situations would you say something like this?</p>") )        
                    )
            .wait()
        ,
        newCanvas("say", 1500, 100)
            .add( 0, 0, getText("question") )
            .add( 0, 60, newTextInput("feedback", "") 
                .size(400, 50))
            .print()
        ,
        newCanvas("blankspace", 1500, 25)
            .print()
        ,
        newButton("continue", "Continue")
            .center()
            .css("font-family", "Times New Roman")
            .css("font-size", "1.2em")
            .print()
            .wait()
    )
    
    //Judgments
    newTrial( "LBQ3" ,
        defaultText
            .settings.css("padding-left", "5px")
            .settings.css("padding-right", "5px")
            .settings.css("font-size", "1.2em")
            .print()
        ,
        defaultTextInput
            .settings.css("padding-left", "5px")
            .settings.css("padding-right", "5px")
            .settings.css("font-family", "Times New Roman")
            .settings.css("font-size", "1.2em")
        ,
        defaultDropDown
            .settings.css("padding-left", "5px")
            .settings.css("padding-right", "5px")
            .settings.css("font-family", "Times New Roman")
            .settings.css("font-size", "1.2em")
        ,
        newText("<u><b>Language Background Questionnaire</b></u>")
            .center()
            .print()
        ,
        newText("<p> Picture a situation where someone used to hate classical music but likes it now. Imagine them saying the following sentence: 'I listen to classical music anymore.' Indicate whether this sentence is: </p>")
            .print()
        ,
        newText("question", "")
        ,
        newDropDown("hear", "a kind of sentence ...")
            .css("font-family", "Times New Roman")
            .css("font-size", "1.2em")
            .add("a kind of sentence you have <b>heard</b> often", "a kind of sentence you have <b>heard</b> occasionally", "a kind of sentence you have never <b>heard</b> before")
            .print()
            .log()
            .callback(
                self.test.selected("a kind of sentence you have never <b>heard</b> before")
                    .success( getText("question").text("<p>How might you hear this same idea expressed instead?</p>") )
                    .failure( getText("question").text("<p>Where have you heard sentences like this?</p>") )
                    )
            .wait()
        ,
        newCanvas("hear", 1500, 100)
            .add( 0, 0, getText("question") )
            .add( 0, 60, newTextInput("feedback", "") 
                .size(400, 50))
            .print()
        ,
        newCanvas("blankspace", 1500, 25)
            .print()
        ,
        newButton("continue", "Continue")
            .center()
            .css("font-family", "Times New Roman")
            .css("font-size", "1.2em")
            .print()
            .wait()
    )
    
    // Now we send the results
    SendResults( "send" )
        .setOption("countsForProgressBar", false)
    
    //End of experiment message and verification code
    newTrial( "code" ,
        defaultText
            .settings.css("padding-left", "120px")
            .settings.css("padding-right", "120px")
            .settings.css("font-size", "1.2em")
            .print()
        ,
        defaultHtml
            .settings.css("padding-left", "120px")
            .settings.css("padding-right", "120px")
            .settings.css("font-size", "1.2em")
            .print()
        ,
        newButton("finish", "End experiment")
            .settings.css("font-family", "Times New Roman")
            .settings.css("font-size", "1.2em")
            .center()
        ,
        newHtml("end", "End.html")
            .print()
        , 
        getButton("finish")
            .print()
            .wait()
    
    )
    .setOption("countsForProgressBar", false)
    
    //Final window
    newTrial( "final" ,
         defaultText
            .settings.css("padding-left", "120px")
            .settings.css("padding-right", "120px")
            .settings.css("font-size", "1.2em")
            .print()
        ,
        newText("<p><b>You may now exit the window.</b></p>")
            .center()
            .print()
            .wait()
    )
    .setOption("countsForProgressBar", false)

    Best,
    Valerie

    #7045
    Jeremy
    Keymaster

    Hi Valerie,

    Do you mind sharing your project’s demonstration link, either here or at support@pcibex.net, so I can see the full code of your project (without having to paste it here) and troubleshoot it live?

    Jeremy

    #7046
    Valerie
    Participant

    Hi Jeremy,

    I just shared the demonstration link via support@pcibex.net.

    Thanks!

    Valerie

    #7047
    Jeremy
    Keymaster

    The first thing I did with my copy of your project was re-activating the Debug popup: by inspecting the Sequence tab, I saw that the last trial is LQB, which means that the other trials are not included at all, ie. they are not skipped upon runtime, they just fail to be created

    The Debug window also indicated that your project is running PennController 1.8-dev, in which the self keyword that you use at lines 1197 and 1256 wasn’t defined yet (I was able to identify this specific problem by opening the browser’s web console in which I saw the message “self.test is undefined”)

    You can replace the first self with getDropDown("say") and the second one with getDropDown("hear"), or update your version of PennController (the latest version is here). If you choose to go with the latter, make sure you take another test-run of your experiment (with the debugger on—basically keep the debugger on until you are about to compensate your first participant) to check that nothing broke in the process. There shouldn’t be any major problems, but I sometimes bring aesthetic updates with new releases

    Jeremy

    #7048
    Valerie
    Participant

    Hi Jeremy,

    That makes sense! I was unaware that there were different versions of the PennController and I will leave the debugger on from now on until publication of the experiment.

    Thanks for your help!

    Best,
    Valerie

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