Can't change finishpage in experiment


Author
Message
sbeswick
sbeswick
New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)
Group: Forum Members
Posts: 2, Visits: 9
Hi all,

I am using inquisit 6.6.1

I would like to change the page my participants are redirected to when the experiment finishes based on whether they pass screening criteria. I have gone to the “Finish Page” section of the inquisit web interface and selected “Redirect to the default finish web page”, as I saw another forum post suggesting that this was required.
Then, in the .iqx script for my first screening question, I have included this code in my first trial:
<trial Consent1>
/ontrialbegin = [defaults.finishpage = "https://www.google.com/yes/";]
/ontrialend = [
if (trial.Consent1.response == "disagree") {
  defaults.finishpage="https://www.google.com/no/";
  script.abort();
}
]
</trial>


What happens is that no matter whether or not the user clicks “agree” or “disagree”, at the end of my experiment they are redirected to the default inquisit finish page (i.e., “The session is complete, and your data were successfully uploaded. Thank you for your participation!”)
I know that the if statement in the ontrialend chunk is being executed, because script.abort() is run, and the rest of my experiment is immediately halted. However, the finish page does not redirect to google. I notice that the finishpage I’m trying to set in ontrialbegin also doesn’t work.
I have also tried setting a custom finish page in the inquisit web frontend settings. This works, but I still can’t change it the finish page from my code. 

It appears to me that there is a bug in defaults.finishpage.
Is there a step I have missed somewhere?

Regards,
Sebastian

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 101K
sbeswick - 5/10/2024
Hi all,

I am using inquisit 6.6.1

I would like to change the page my participants are redirected to when the experiment finishes based on whether they pass screening criteria. I have gone to the “Finish Page” section of the inquisit web interface and selected “Redirect to the default finish web page”, as I saw another forum post suggesting that this was required.
Then, in the .iqx script for my first screening question, I have included this code in my first trial:
<trial Consent1>
/ontrialbegin = [defaults.finishpage = "https://www.google.com/yes/";]
/ontrialend = [
if (trial.Consent1.response == "disagree") {
  defaults.finishpage="https://www.google.com/no/";
  script.abort();
}
]
</trial>


What happens is that no matter whether or not the user clicks “agree” or “disagree”, at the end of my experiment they are redirected to the default inquisit finish page (i.e., “The session is complete, and your data were successfully uploaded. Thank you for your participation!”)
I know that the if statement in the ontrialend chunk is being executed, because script.abort() is run, and the rest of my experiment is immediately halted. However, the finish page does not redirect to google. I notice that the finishpage I’m trying to set in ontrialbegin also doesn’t work.
I have also tried setting a custom finish page in the inquisit web frontend settings. This works, but I still can’t change it the finish page from my code. 

It appears to me that there is a bug in defaults.finishpage.
Is there a step I have missed somewhere?

Regards,
Sebastian

If you are running multiple scripts in a batch, the finsih page needs to be set at the batch script level at the very end, not in or by any of the task scripts.
sbeswick
sbeswick
New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)
Group: Forum Members
Posts: 2, Visits: 9
Dave - 5/10/2024
sbeswick - 5/10/2024
Hi all,

I am using inquisit 6.6.1

I would like to change the page my participants are redirected to when the experiment finishes based on whether they pass screening criteria. I have gone to the “Finish Page” section of the inquisit web interface and selected “Redirect to the default finish web page”, as I saw another forum post suggesting that this was required.
Then, in the .iqx script for my first screening question, I have included this code in my first trial:
<trial Consent1>
/ontrialbegin = [defaults.finishpage = "https://www.google.com/yes/";]
/ontrialend = [
if (trial.Consent1.response == "disagree") {
  defaults.finishpage="https://www.google.com/no/";
  script.abort();
}
]
</trial>


What happens is that no matter whether or not the user clicks “agree” or “disagree”, at the end of my experiment they are redirected to the default inquisit finish page (i.e., “The session is complete, and your data were successfully uploaded. Thank you for your participation!”)
I know that the if statement in the ontrialend chunk is being executed, because script.abort() is run, and the rest of my experiment is immediately halted. However, the finish page does not redirect to google. I notice that the finishpage I’m trying to set in ontrialbegin also doesn’t work.
I have also tried setting a custom finish page in the inquisit web frontend settings. This works, but I still can’t change it the finish page from my code. 

It appears to me that there is a bug in defaults.finishpage.
Is there a step I have missed somewhere?

Regards,
Sebastian

If you are running multiple scripts in a batch, the finsih page needs to be set at the batch script level at the very end, not in or by any of the task scripts.

This worked, thanks Dave!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search