Digit Span demo Bug

URL of experiment: https://gitlab.pavlovia.org/demos/digit-span-task/

Description of the problem: Hi all- a few months ago I cloned this task. It seemed to work on builder perfectly, and when I run it on builder it still works the way it should (ie. moving you on to the next round if you get 2/3 trials correct). However, when I upload it to Pavlovia, there appears to be a bug in which the experiment terminates if you get 2 correct in a row. This happens when I run the experiment directly from the link above as well. I am on a Mac OS in Chrome. Is anyone else experiencing this problem?

Yes, I’m also experiencing this problem and am working to figure it out. I’m guessing it has something to do with the logic in the JS code, but I’m not sure. Please let me know if you figure it out!

Update: I have checked out the logic in the feedback code snipped and it does not seem to be the problem. It seems like it is ending the blocks loop too quickly in JS version but not python version, and I cannot figure out why. Please let me know if you figure it out!

I think I figured it out. In the feedback code chunk I just removed trials.finished = true In the JS side and that seemed to solve it

Wow, thank you, yes that seems to have done it!

I do want to note that the JS task now does not have exactly the same behavior as the python version anymore. In the python version, as soon as you get two consecutive trials in a block correct, it moves you to the next block without showing the third trial. In the JS version, after removing the trials.finished = true, it will show you all three trials in a block regardless. For me and the way I’m adapting the code, this is not an issue, as I am going to only show two trials and they always see two trials regardless of how they did on the first one. But I did want to note this change in the behavior of the JS version versus the python version.

Seems like this issue, that for some reason in JS trials.finished = true behaves/is treated differently than trials.finished = True in the python code, is something to flag for the developers. I wonder whether other people are having problems with this (i.e., ending a loop that is nested within another loop without ending the outer loop) in other JS tasks.

Thank you again for your help! I appreciate it!

Good to know- Yes I don’t think that will be an issue for my purpose either. No problem! A labmate of mine handy in JS solved it in just a few moments.

Great! Did your lab are have a sense of why it was causing both loops to end when it should have only ended the trials loop?

No- the issue was solved over email so there wasn’t much of a back and forth as to what the problem was, unfortunately.