Specifying length of experiment
Hello!
I'm close to completing building this task I've been working on, and it's very simple, but I'm looking for help on one last piece. The task is just presenting a bunch of randomized multiple choice questions assessing medical knowledge, and I'm planning to transfer to an Android tablet for the actual experiment. My questions is: is there a way to end the experiment after 5 minutes have elapsed?
Thank you!
Comments
Hi Lauren,
You can use two
inline_scripts. One put before the stuff that you are measuring and one after. In the first, you have something like:t0 = clock.time(). In the second:Now you only have to make sure that all your multiple choice forms are placed in a loop and that this loop is only executed if the variable break_the_loop is False.
Does this help?
Eduard
Hi,
Thanks! This is helpful and it is intuitive to me, but I am struggling to make it work still. I've done as you suggested, but I'm not sure how to define the variable break_the_loop in my loop table where I've created variables for the questions and corresponding multiple choice options. Do you have any advice?
Thanks again,
Lauren
Hi Lauren,
Inside an
inline_scriptsomewhere in the beginning of your script, before you enter your block loop, you just define a variable to be False, like so:var.break_the_loop = False. If you click on the block sequence in the overview area, the sequence will appear in the tab view on the right, there you see all the items of that sequence followed by a "run_if" field. In there you can add this variable:[break_the_loop]=False.This together with the 2nd inline_script I mentioned above, should do the trick. It's possible that might wrap another loop around this one, to get the desired effect. Does it help?
Btw. attached an example script that contains the critical bits
Eduard