direct one condition to an external link?


Author
Message
xizhouxie
xizhouxie
Associate Member (71 reputation)Associate Member (71 reputation)Associate Member (71 reputation)Associate Member (71 reputation)Associate Member (71 reputation)Associate Member (71 reputation)Associate Member (71 reputation)Associate Member (71 reputation)Associate Member (71 reputation)
Group: Forum Members
Posts: 6, Visits: 67
We are currently trying to develop a study with the following two conditions. The first condition will be done once they complete the Inquisit survey. In the second condition, we need participants to be redirected to an external webpage once they finish the Inquisit survey. Is there any way we can do that? I tried imbedding the website within inquisit, but that was extremely clunky and there was no way to click anything.
Dave
Dave
Supreme Being (795K reputation)Supreme Being (795K reputation)Supreme Being (795K reputation)Supreme Being (795K reputation)Supreme Being (795K reputation)Supreme Being (795K reputation)Supreme Being (795K reputation)Supreme Being (795K reputation)Supreme Being (795K reputation)
Group: Administrators
Posts: 10K, Visits: 53K
xizhouxie - 3/11/2020
We are currently trying to develop a study with the following two conditions. The first condition will be done once they complete the Inquisit survey. In the second condition, we need participants to be redirected to an external webpage once they finish the Inquisit survey. Is there any way we can do that? I tried imbedding the website within inquisit, but that was extremely clunky and there was no way to click anything.

Yes, you can do that by setting the defaults.finishpage property to the external URL in the one condition, but not the other. I.e. if you have two <expt>s for the respective conditions, do

// condition 1: No redirection
<expt>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
...
</expt>

// condition 2: Redirect to external URL
<expt>
/ onexptend = [
    defaults.finishpage = concat("https://www.example.com/?subjectid=", script.subjectid);
]
/ subjects = (2 of 2)
/ groupassignment = groupnumber
...
</expt>


If you are running things via <batch>, the defaults.finishpage ought to be set at the end of the batch instead:

// condition 1: No redirection
<batch>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
...
/ file = "condition1.iqx"
</batch>

// condition 2: Redirect to external URL
<batch>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
...
/ file = "condition2.iqx"
/ onscriptend = [if (batch.2.currentscript == "condition2.iqx") defaults.finishpage = concat("https://www.example.com/?subjectid=", script.subjectd);]
</batch>

xizhouxie
xizhouxie
Associate Member (71 reputation)Associate Member (71 reputation)Associate Member (71 reputation)Associate Member (71 reputation)Associate Member (71 reputation)Associate Member (71 reputation)Associate Member (71 reputation)Associate Member (71 reputation)Associate Member (71 reputation)
Group: Forum Members
Posts: 6, Visits: 67
Dave - 3/11/2020
xizhouxie - 3/11/2020
We are currently trying to develop a study with the following two conditions. The first condition will be done once they complete the Inquisit survey. In the second condition, we need participants to be redirected to an external webpage once they finish the Inquisit survey. Is there any way we can do that? I tried imbedding the website within inquisit, but that was extremely clunky and there was no way to click anything.

Yes, you can do that by setting the defaults.finishpage property to the external URL in the one condition, but not the other. I.e. if you have two <expt>s for the respective conditions, do

// condition 1: No redirection
<expt>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
...
</expt>

// condition 2: Redirect to external URL
<expt>
/ onexptend = [
    defaults.finishpage = concat("https://www.example.com/?subjectid=", script.subjectid);
]
/ subjects = (2 of 2)
/ groupassignment = groupnumber
...
</expt>


If you are running things via <batch>, the defaults.finishpage ought to be set at the end of the batch instead:

// condition 1: No redirection
<batch>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
...
/ file = "condition1.iqx"
</batch>

// condition 2: Redirect to external URL
<batch>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
...
/ file = "condition2.iqx"
/ onscriptend = [if (batch.2.currentscript == "condition2.iqx") defaults.finishpage = concat("https://www.example.com/?subjectid=", script.subjectd);]
</batch>

Thanks Dave. I will try that and report back. Is the subjectid in the link necessary? They are going to another page where they need to sign in, so we won't need their subjectid to link the data.
Dave
Dave
Supreme Being (795K reputation)Supreme Being (795K reputation)Supreme Being (795K reputation)Supreme Being (795K reputation)Supreme Being (795K reputation)Supreme Being (795K reputation)Supreme Being (795K reputation)Supreme Being (795K reputation)Supreme Being (795K reputation)
Group: Administrators
Posts: 10K, Visits: 53K
xizhouxie - 3/11/2020
Dave - 3/11/2020
xizhouxie - 3/11/2020
We are currently trying to develop a study with the following two conditions. The first condition will be done once they complete the Inquisit survey. In the second condition, we need participants to be redirected to an external webpage once they finish the Inquisit survey. Is there any way we can do that? I tried imbedding the website within inquisit, but that was extremely clunky and there was no way to click anything.

Yes, you can do that by setting the defaults.finishpage property to the external URL in the one condition, but not the other. I.e. if you have two <expt>s for the respective conditions, do

// condition 1: No redirection
<expt>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
...
</expt>

// condition 2: Redirect to external URL
<expt>
/ onexptend = [
    defaults.finishpage = concat("https://www.example.com/?subjectid=", script.subjectid);
]
/ subjects = (2 of 2)
/ groupassignment = groupnumber
...
</expt>


If you are running things via <batch>, the defaults.finishpage ought to be set at the end of the batch instead:

// condition 1: No redirection
<batch>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
...
/ file = "condition1.iqx"
</batch>

// condition 2: Redirect to external URL
<batch>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
...
/ file = "condition2.iqx"
/ onscriptend = [if (batch.2.currentscript == "condition2.iqx") defaults.finishpage = concat("https://www.example.com/?subjectid=", script.subjectd);]
</batch>

Thanks Dave. I will try that and report back. Is the subjectid in the link necessary? They are going to another page where they need to sign in, so we won't need their subjectid to link the data.

Then it's not necessary.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search