Howdy, Stranger!

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

Supported by

Linked sequence only runs once in the browser

I've been trying to debug a student's experiment, and have run into a wall: the script runs fine locally, but only runs the sequence "Letters_choice_sequence" the first time around (during the practice run), despite the fact that the sequences are all linked, and should be exactly the same. I have run out of ideas; maybe somebody else can spot what I cannot?

The script is attached; it is just a skeleton, so you have to hit a key to advance in places where you might expect it to advance automatically, etc. It is just the running of "Letters_choice_sequence" in the browser that I can't figure out.

Thanks in advance to anyone willing to take a look at this!

Comments

  • Hi @ethanweed ,

    You're running into a manifestation of this issue, which we still have to wrap our heads around and fix properly. The issue happens for some items when they are prepared twice in a row, and then run twice in a row. So basically when they go prepare-prepare-run-run, rather than prepare-run-prepare-run. If you look at your experiment, you can see how that happens for the Letters_choice_sequence (see also this page).

    This should absolutely be fixed in OSWeb, because it results in (seemingly) unpredictable and confusing behavior. For now, though, you can work around this by putting Letters_choice_sequence inside a dummy loop with only one cycle.

    — Sebastiaan

  • Thanks @sebastiaan, that worked! For others that might end up here with the same problem I had, I have two extra points:

    1. using the dummy loop with only one cycle as @sebastiaan suggested worked, but it needed to be an unlinked loop. Which makes sense, I guess, given the nature of the problem, but at first I tried to be all neat and tidy and make a linked dummy loop, which did not work. The sequence run by the loop could still be linked, though
    2. defining variables for the second linked sequence using inline javascript continued to give problems, but defining the variables as a single row in the dummy variable worked

    I have attached what I believe to be a working version of the script where I have implemented @sebastiaan 's suggestions, in case it helps anybody else.

    /Ethan


Sign In or Register to comment.