URL of experiment: https://run.pavlovia.org/KDaughters/validation-study-1/html/
Description of the problem:
If I run my online study all the way to the end the .csv file is created and all the data are there. However, if I click any of the buttons that deliberately end my study (decline consent items), or if I quit the study half way through (simulate a bored participant), I get a .csv file that is completely blank. If I run the study locally through builder, and quit half way through the .csv file is fine and has all the data.
I’ve tried putting the consent items in a blank loop as suggested in other topics, but this doesn’t work. And both my practice trials and experimental trials are in loops anyway, and if I quit the study here the data still isn’t saved.
As far as I can see in the JS code after each routine there is a - psychoJS.experiment.addData - command, and the data is obviously being stored somewhere because if you finish the whole study all that data is there.
Is there a way to ensure that the .csv file contains all the data collected up to that point, even for participants who do not finish the study?
Many thanks!
Katie