Is It Possible to Modify Files in .git repository of an experiment (.txt, .xlsx, .csv) via Javascript in Pavlovia?

Hi all,

I am working on a longitudunal study where it will be ideal if I could store participants’ progress after each session (multiple sessions on different dates) in a file within the experiment’s git repository. For instance, I would like to register the randomized order of stimuli that they received, whether or not they started with condition A instead B so that I can use that info on the upcoming session etc.

There does not seem to be a straight-forward answer to this, and it looks like this may require a database involvement. I guess this leads to the next question: is it possible to send/read data to a database via javascript code in an experiment?

Any help is much appreciated, thanks!

Hi Mert, you could use this: Using the Shelf for Multi-session testing, Counterbalancing and more online — PsychoPy v2022.2.2. To be honest, I myself am trying to use it and it is not working, see How to use shelf record. But in case it works it will be exactly what you need.

1 Like

Thanks a lot! I’ll try these and post the results here. Though it might take more than a week for me to post that.

Hi again ajus!

Initially I failed to make it work but then I changed the version to 2022.2.3 and now it works! Thanks for the help!

Hi Mert, thanks for the hint! Sadly, this does not fix my problem. Would you be so kind to compare your code with what I posted here and tell me if there is anything obviously wrong with what I did? Thanks! Adrian

Edit: I fixed it now. I had to set the “scope” of the record to the specific experiment. “Designer” did not work.

Great to hear it worked!