Win 10
2020.2.5
Standalone
https://run.pavlovia.org/ayjayar/thesis4421-4pm
I’m sure there’s a much easier solution to this, but I’m not seeing it.
Is it possible to make the completion URL a variable? Depending on the session #, the participant will see a different video. I then want the resulting completion URL to be different, as it will direct the participant to a qualtrics form that corresponds with that video. However, it appears the completion URL from settings is loaded before any of the code in the builder. Currently, I keep receiving
“ReferenceError: survey is not defined”. Anyone have any ideas on how to define $survey before it is called from settings, or a workaround?
I’ve tried placing the survey variable before experiment and at begin experiment, but no luck.
window.survey = ‘’;
if (expInfo[‘participant’] == ‘1’ && expInfo[‘session’] == ‘1’)
{
window.survey = ‘https://usmuw.co1.qualtrics.com/jfe/form/SV_7QBEZGv0PuZtmAe’;
window.vidDur = 15;
}
else
{
if (expInfo[‘participant’] == ‘1’ && expInfo[‘session’] == ‘2’)
{
window.survey = ‘https://usmuw.co1.qualtrics.com/jfe/form/SV_73dh8xcYxabXsnI’;
window.vidDur = 30;
}
}
Any input would be greatly appreciated.