Progress bar does not show up

PennController for IBEX Forums Support Progress bar does not show up

Tagged: 

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #10995
    Da_Ri_
    Participant

    I have a very basic question about the progress bar. Following is my code but the progress bar does not show up. How can I make it show up?

    PennController.ResetPrefix(null) // Shorten command names (keep this line here))

    var showProgressBar = true;

    // Start with welcome screen, then present test trials in a random order,
    // and show the final screen after sending the results
    Sequence(“ID”,”Consent”,”Intro”,”Practice Intro”,randomize(“Practice”),”Experiment Intro”,randomize(“Trial”), “send”, “final” )
    //Sequence(shuffle(randomize(“practice_sentence”), randomize(“practice_calculation”)),”Experiment Intro”,shuffle(randomize(“sentence”), randomize(“calculation”)),”send”, “final” )

    //DebugOff(); //use before publishing

    Header( /* void */ )
    // This .log command will apply to all trials
    //.log( “ID” , GetURLParameter(“id”) ) // Append the “ID” URL parameter to each result line

    //

    PennController(“ID”,
    defaultText
    .print()
    ,
    newText(“<p>Please enter your MTurk Worker ID and click the button below to procede.</p>”)
    ,
    newTextInput(“inputID”)
    .cssContainer({“margin-bottom”:”1em”})
    .print()
    ,
    newButton(“Start”)
    .print()
    .wait(getTextInput(“inputID”).testNot.text(“”) )
    ,
    newVar(“ID”)
    .global()
    .set(getTextInput(“inputID”))
    )
    .log( “ID”, getVar(“ID”) );

    //Consent
    PennController(“Consent”,

    newText(“*Please use Google Chrome.*”)
    .center()
    .css(“text-align”, “justify”)
    .css(“font-size”, “18px”)
    .print()
    ,

    newCanvas(“empty canvas1”, 1, 40) //add some space
    .print()
    ,

    newHtml(“consent”, “consent.html”)
    .center()
    .checkboxWarning(“This field is required.”)
    .radioWarning(“This field is required.”)
    .inputWarning(“This field is required.”)
    .css(“text-align”, “justify”)
    .css(“margin-right”, “10%”)
    .css(“margin-left”, “10%”)
    .log()
    .print()
    ,

    newCanvas(“empty canvas0”, 1, 40) //add some space
    .print()
    ,

    newButton(“Continue”, “Next”)
    .center()
    .print()
    ,

    newCanvas(“empty canvas”, 1, 40) //add some space below the Continue button
    .print()
    ,

    getButton(“Continue”)
    .wait(
    getHtml(“consent”)
    .test.complete()
    .failure(getHtml(“consent”).warn())
    )
    );

    //Intro
    PennController(“Intro”,

    newText(“*Read the instruction below carefully and click Next to begin the practice session.*”)
    .center()
    .css(“text-align”, “justify”)
    .css(“font-size”, “18px”)
    .print()
    ,

    newCanvas(“empty canvas1”, 1, 40) //add some space
    .print()
    ,

    newHtml(“instruction”, “intro.html”)
    .center()
    .css(“text-align”, “justify”)
    .css(“margin-right”, “21%”)
    .css(“margin-left”, “21%”)
    .print()
    ,

    newCanvas(“empty canvas2”, 1, 40) //add some space
    .print()
    ,

    newButton(“Continue”, “Next”)
    .center()
    .print()
    ,

    newCanvas(“empty canvas”, 1, 40) //add some space below the Continue button
    .print()
    ,

    getButton(“Continue”)
    .wait()
    ,
    newVar(“ExperimentDuration”)
    .set( v => Date.now() ) //start timer
    );

    //Practice Intro
    PennController(“Practice Intro”,

    newText(“startmessage”, “You are about to start the practice session. Place your fingers on F, J, and spacebar as shown below. Press the spacebar when you are ready.”)
    .center()
    .css(“text-align”, “justify”)
    .css(“font-size”, “18px”)
    .print()
    ,
    newCanvas(“empty canvas1″, 1, 40) //add some space
    .print()
    ,

    newImage(‘finger position’, ‘FingerPosition.jpg’ )
    .settings.size(300,200)
    .center()
    .print()
    ,

    newKey(” “)
    .log()
    .wait()
    ,

    getText(“startmessage”)
      .remove()
      ,
    getImage(“finger position”)
      .remove()
    );

    // Practice session
    Template(GetTable(“test.csv”), row =>
    PennController(“Practice”,
    // defaultText.center().print(“center at 50%”, “middle at 37.5%”).log()
    // ,
    // defaultTimer.log().start().wait()
    // ,

    newText(“mask1″,”++++++”).print(“center at 50%”, “middle at 37.5%”),
    newTimer(“maskTimer1”,1000).start().wait(),
    getText(“mask1”).remove()
    ,
    newText(“Context”, row.Context).log().print(“center at 50%”, “middle at 37.5%”),
    newKey(“answerContext”, ” “).log().wait(),
    getText( “Context” ).remove()
    ,
    newText(“mask2″,”++++++”).print(“center at 50%”, “middle at 37.5%”),
    newTimer(“maskTimer2”,500).start().wait(),
    getText(“mask2”).remove()
    ,
    newImage(‘YesNo’, ‘YesNo.jpg’ )
    .settings.size(250,100)
    .print(“center at 50%”, “middle at 50%”)
    ,
    newText( “Question”, row.Question).log().print(“center at 50%”, “middle at 37.5%”),
    newKey(“answerQuestion”, “FJ”).log().wait(),
    getText( “Question” ).remove()
    )
    .log(“ID”, getVar(“ID”))
    //.log(“group”,row.group)
    //.log(“ItemID”,row.ItemID)
    .log(“Context”,row.Context)
    .log(“Question”, row.Question)
    .log(“Correct_answer”, row.Correct_answer)
    .log(“Target_sentence_position”, row.Target_sentence_position)
    .log(“Experimental_or_filler”,row.Experimental_or_filler)
    .log(“Number_of_propositions”,row.Number_of_propositions)
    .log(“Condition”, row.Condition)

    );

    //Actual Experiment Intro
    PennController(“Experiment Intro”,

    newText(“startmessage”, “The practice session is over. You are about to start the actual experiment. Place your fingers on F, J, and spacebar as shwon below. Press the spacebar when you are ready.”)
    .center()
    .css(“text-align”, “justify”)
    .css(“font-size”, “18px”)
    .print()
    ,

    newCanvas(“empty canvas1″, 1, 40) //add some space
    .print()
    ,

    newImage(‘FingerPosition’, ‘FingerPosition.jpg’ )
    .settings.size(300,200)
    .center()
    .print()
    ,

    newKey(” “)
    .log()
    .wait()
    ,

    getText(“startmessage”)
      .remove()
      ,
    getImage(“FingerPosition”)
      .remove()

    );

    //Block1
    // Actual session 1
    Template(GetTable(“test.csv”), row =>
    PennController(“Trial”,
    // defaultText.center().print(“center at 50%”, “middle at 37.5%”).log()
    // ,
    // defaultTimer.log().start().wait()
    // ,

    newText(“mask3″,”++++++”).print(“center at 50%”, “middle at 37.5%”),
    newTimer(“maskTimer3”,1000).start().wait(),
    getText(“mask3”).remove()
    ,
    newText( “Context”, row.Context).log().print(“center at 50%”, “middle at 37.5%”),
    newKey(“answerContext”, ” “).log().wait(),
    getText( “Context” ).remove()
    ,
    newText(“mask4″,”++++++”).print(“center at 50%”, “middle at 37.5%”),
    newTimer(“maskTimer4”,500).start().wait(),
    getText(“mask4”).remove()
    ,
    newImage(‘YesNo’, ‘YesNo.jpg’ )
    .settings.size(200,90)
    .print(“center at 50%”, “middle at 50%”)
    ,
    newText(“Question”, row.Question).log().print(“center at 50%”, “middle at 37.5%”),
    newKey(“answerQuestion”, “FJ”).log().wait(),
    getText( “Question” ).remove()
    )
    .log(“ID”, getVar(“ID”))
    //.log(“group”,row.group)
    //.log(“ItemID”,row.ItemID)
    .log(“Context”,row.Context)
    .log(“Question”, row.Question)
    .log(“Correct_answer”, row.Correct_answer)
    .log(“Target_sentence_position”, row.Target_sentence_position)
    .log(“Experimental_or_filler”,row.Experimental_or_filler)
    .log(“Number_of_propositions”,row.Number_of_propositions)
    .log(“Condition”, row.Condition)
    );

    // Send the results
    SendResults(“send”)

    // A simple final screen
    newTrial (“final” ,
    newText(“The experiment is over.”)
    .print()
    ,
    newText(“Thank you.”)
    .print()
    ,
    newText(“Please put the following code in the relevant field in Amazon Mechanical Turk.”)
    .print()
    ,
    newText(“11112222”)
    .print()
    ,
    // Stay on this page forever
    newButton().wait())

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.