URL of experiment:
https://run.pavlovia.org/sokolhessnerlab/cgtgamblingspantasks
PsychoPy version: 2022.2.1
OS: MacOS 12.3.1
Description of the problem:
We are using daisy chaining to pass participant IDs throughout our study (Prolific ID gets passed to Qualtrics, then Pavlovia, then Qualtrics again).
The participant ID seems to successfully be passed from Qualtrics to Pavlovia as it shows up as a variable in the .csv data file at the end of the experiment but the participant ID is not saved in the .csv file name. Instead the filename is saved as â_studyName_dateAndtime.csvâ.
It seems like the expInfo[âparticipantâ] variable is treated as empty when the data file name is created. However, this is odd because the expInfo[âparticipantâ] works fine when creating the redirect URL (the participant ID is successfully passed on from Pavlovia to Qualtrics).
In the .js script, the datafile name is created like this:
psychoJS.experiment.dataFileName = (("." + "/") + `data/${expInfo["participant"]}_${expName}_${expInfo["date"]}`);
and then a few lines below that, the redirect URL is set:
// add info from the URL:
util.addInfoFromUrl(expInfo);
psychoJS.setRedirectUrls(('https://udenver.qualtrics.com/jfe/form/SV_a4qaGzutOwOjcPk?PROLIFIC_PID=' + expInfo['participant']), 'https://app.prolific.co/submissions/complete?cc=C7B3UXTE');
Both of these blocks of code use the same variable expInfo[âparticipantâ] but for some reason the participant id is only showing up in the redirect URL but not the data file name.
The participant ID is included in both the .csv file and the .csv file name when I manually input a participant ID into the dialogue box at the start of the experiment, so the issue is only happening when trying to pass the participant ID using URL.
The experiment otherwise runs smoothly from start to finish, just having this one issue.
Thank you in advanced for any insight!