Reply To: Can we randomize time with newTimer() ?

PennController for IBEX Forums Support Can we randomize time with newTimer() ? Reply To: Can we randomize time with newTimer() ?

#7931
Larissa_Cury
Participant

Got it! Thank you SO MUCH for your kindness, I really appreciate it!! I think that now I’ve understood it properly!

Let me ask you something about the feedback trials: they’re working properly and I’ve already made the changes you’ve tought me how to do. However, on my “instructions_E” trial (below) =>

newTrial("instructions_E",
  newText("instructions-12","Você está pronto?")
    .cssContainer({
        "border": "5px solid black",
        "background-color": "yellow",
        "color": "black",
        "font-size":"50px"
    })
    .center()
    .print()
  ,
  newText("instructions-17","<p>Sinta-se livre para fazer uma pausa agora</p>")
    .cssContainer({
        "font-size":"22px",
        "text-align": "center"
    })
    .center()
    .print()
  ,
  newImage("boy-image","boy.png")
    .size(200,200)
    .center()
    .print()
  ,
  newText("instructions-14","<p><center> Se você quiser praticar de novo, clique aqui:")
    .cssContainer({
        "font-size":"22px",
        "text-align": "center"
    })
    .center()
    .print()
  ,
  newButton("come back","Voltar à prática")
    .callback( jump(startsWith("p_trial")) , end() )
    .css("margin","1.5em")
    .center()
    .print()
  ,
  newText("instructions-15","<p><center>Quando você se sentir <b style=color:red;>PRONTO</b>, clique no botão abaixo:</p></center>")
    .cssContainer({
        "font-size":"22px",
        "text-align": "center"
    })
    .center()
    .print()
  ,
  newButton("wait","Começar")
    .center()
    .print()
    .wait()
);

If I press the COME BACK button, it does come back, but it sums all trials. For example, if I take the practice trial twice, then it shows me my feedback for 48 trials. Is there a way to make it “reset” to only one time if the participant decides to come back?

In the feedback trial,

newVar("timeText").set( getVar("practiceRTs").global() ).set(v=> "Você demorou "+(v.reduce((n,m)=>n+m)/v.length)/1000+"s por pergunta em média" ), newText( "feedbackTime" ).text( getVar("timeText") ).print() .cssContainer({ "font-size":"22px", "text-align": "left", "white-space":"nowrap"})

If I drop the 1000, then I would have the answer in ms, right?

Thank you once more!

  • This reply was modified 2 years ago by Larissa_Cury. Reason: edit typos