Dear reader,
I have one script that needs to redirect participants from 4 different conditions to 4 different urls. The finish page in my account on Millisecond only allows for one url, so I tried to create a referral to the url in the Inquisit script, which times out after x milliseconds (not ideal, but as far as I know the link just needs to be opened to confirm the participant has completed the study and I don't think the participant has to click anything on that webpage). I need to be able to change that url depending on the groupid. I tried it using a list or a value, but both do not seem to work.
See below for the relevant code I used. For the url, I put in a google page as an example. So far, I only specified the url for groupid=1. In the code below, I try to use the list. I have also tried it with value. In that case: in the expt command, I then substituted
list.prolific_url.appenditem("?gfe_rd=cr&ei=DPrGV_yAGsexOuyWvPAK#q=happy")
with
values.urlvalue = "?gfe_rd=cr&ei=DPrGV_yAGsexOuyWvPAK#q=happy"
and in the html command, I substituted
<% list.prolific_url.currentvalue %>
with
<% values.urlvalue %>
However, both do not seem to work. Using a value (opposed to a list) seems most effective, as it does print the correct url when I add "
https://www.google.nl/<% values.urlvalue %>"in a caption of a radiobuttons item that happens to be in my script, but when it actually opens the url later in the script, it seems to use the original value of urlvalue ('bla'), not the value that should be assigned to urlvalue on the beginning of the experiment.
Any ideas as to what goes wrong or how else I can accomplish the goal of redirecting participants to different urls, depending on their groupid?
Kind regards,
Lin
*** URL PARTICIPANTS NEED TO BE SENT TO UPON COMPLETION OF STUDY ***
<list pr_url>
/selectionmode = sequence
</list>
<values>
/ urlvalue = "bla"
</values>
<html pr_url>
/items = ("https://www.google.nl/<% list.prolific_url.currentvalue %>")</html>
<trial pr_url>
/stimulusframes = [1=pr_url]
/showmousecursor = True
/timeout = 10000
</trial>
<block pr_url>
/trials = [1=pr_url]
***EXPERIMENT***
<expt RC>
/ blocks = [1=resolution; 2=consent; 3=distr; 4=forced_choice_block1; 5=forced_choice_block2; 6=forced_choice_block3; 7=forced_choice_block4; 8=forced_choice_block5; 9=demographics; 10=pr_url]
/ postinstructions = (end)
/ onexptbegin = [if (script.groupid == 1) {list.condition_names.appenditem("very negative"); list.condition_names.appenditem("slightly negative"); list.condition_names.appenditem("VERY NEGATIVE");
list.prolific_url.appenditem("?gfe_rd=cr&ei=DPrGV_yAGsexOuyWvPAK#q=happy");}]
/ onexptbegin = [if (script.groupid == 2) {list.condition_names.appenditem("slightly negative"); list.condition_names.appenditem("very negative"); list.condition_names.appenditem("SLIGHTLY NEGATIVE");}]
/ onexptbegin = [if (script.groupid == 3) {list.condition_names.appenditem("slightly positive"); list.condition_names.appenditem("very positive"); list.condition_names.appenditem("SLIGHTLY POSITIVE");}]
/ onexptbegin = [if (script.groupid == 4) {list.condition_names.appenditem("very positive"); list.condition_names.appenditem("slightly positive"); list.condition_names.appenditem("VERY POSITIVE");}]
</expt>