Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

How to randomize the order of blocks between participants

edited March 2021 in OSWeb

Hi,

I've been programming my experiment in Javascript (for OSWeb), and I need to randomize the order of blocks.

What should I code at the beginning of experiment in order to get my blocks randomly presented between participants?

Many thanks,

MG

Comments

  • edited March 2021

    Hi @MicolG ,


    The simplest solution seems to:


    • Nest your blocks (say, block_loop_1 and block_loop_2) in a main-level loop-sequence structure
    • Define a block id in the top-level loop (and set the order to random)



    • Use Run-if statements in the top-level sequence to determine which block should be run, depending on the block id.



    By doing so, you don't need any JavaScript. Does this answer your question?

    I attached a small example experiment.


    Cheers,


    Lotje


    Did you like my answer? Feel free to Buy Me A Coffee :)

  • Hi Lotje,

    Thanks for your help, I managed to solve this out!


    Have a good day


    Micol

Sign In or Register to comment.