aborting experiment conditional on response


aborting experiment conditional on response

Author
Message
nrouhani
nrouhani
Partner Member
Partner Member (900 reputation)Partner Member (900 reputation)Partner Member (900 reputation)Partner Member (900 reputation)Partner Member (900 reputation)Partner Member (900 reputation)Partner Member (900 reputation)Partner Member (900 reputation)Partner Member (900 reputation)

Group: Forum Members
Posts: 30, Visits: 145
hello!

during the instructions portion of my task, participants have to correctly respond to some questions before starting the real task. however, if they exit out of the experiment, the next file within the batch section automatically begins to load allowing them to continue with the experiment. is there a command or a way that forces them to exit the whole experiment? 

thank you!
Dave
Dave
Supreme Being
Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)

Group: Administrators
Posts: 9.4K, Visits: 42K
nrouhani - Wednesday, April 3, 2019
hello!

during the instructions portion of my task, participants have to correctly respond to some questions before starting the real task. however, if they exit out of the experiment, the next file within the batch section automatically begins to load allowing them to continue with the experiment. is there a command or a way that forces them to exit the whole experiment? 

thank you!

Yes, you can terminate the entire batch of scripts by calling script.abort(true) conditionally /ontrialend (or /onblockend, depending on your script's structure).

https://www.millisecond.com/support/docs/v5/html/language/functions/abort.htm

nrouhani
nrouhani
Partner Member
Partner Member (900 reputation)Partner Member (900 reputation)Partner Member (900 reputation)Partner Member (900 reputation)Partner Member (900 reputation)Partner Member (900 reputation)Partner Member (900 reputation)Partner Member (900 reputation)Partner Member (900 reputation)

Group: Forum Members
Posts: 30, Visits: 145
Dave - Wednesday, April 3, 2019
nrouhani - Wednesday, April 3, 2019
hello!

during the instructions portion of my task, participants have to correctly respond to some questions before starting the real task. however, if they exit out of the experiment, the next file within the batch section automatically begins to load allowing them to continue with the experiment. is there a command or a way that forces them to exit the whole experiment? 

thank you!

Yes, you can terminate the entire batch of scripts by calling script.abort(true) conditionally /ontrialend (or /onblockend, depending on your script's structure).

https://www.millisecond.com/support/docs/v5/html/language/functions/abort.htm

thank you for this response! is there a way to do this on a surveypage? based on previous questions i've created the following, but when i dropdown to "abort" nothing happens, thank you!

<surveypage fail>
/ caption = "You did not answer every question correctly. Please re-read the instructions" 
/ questions = [1=abort]
/ fontstyle = ("Arial", 20)
/ txcolor = white
/ nextbuttonposition = (-10%, -10%)
/ branch = [
  if (dropdown.abort.response == "Abort") script.abort(true)
]
</surveypage>

<dropdown abort>
/ options = ("Keep going", "Abort")
/ defaultresponse = "Keep going"
</dropdown>

Dave
Dave
Supreme Being
Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)

Group: Administrators
Posts: 9.4K, Visits: 42K
nrouhani - Wednesday, April 3, 2019
Dave - Wednesday, April 3, 2019
nrouhani - Wednesday, April 3, 2019
hello!

during the instructions portion of my task, participants have to correctly respond to some questions before starting the real task. however, if they exit out of the experiment, the next file within the batch section automatically begins to load allowing them to continue with the experiment. is there a command or a way that forces them to exit the whole experiment? 

thank you!

Yes, you can terminate the entire batch of scripts by calling script.abort(true) conditionally /ontrialend (or /onblockend, depending on your script's structure).

https://www.millisecond.com/support/docs/v5/html/language/functions/abort.htm

thank you for this response! is there a way to do this on a surveypage? based on previous questions i've created the following, but when i dropdown to "abort" nothing happens, thank you!

<surveypage fail>
/ caption = "You did not answer every question correctly. Please re-read the instructions" 
/ questions = [1=abort]
/ fontstyle = ("Arial", 20)
/ txcolor = white
/ nextbuttonposition = (-10%, -10%)
/ branch = [
  if (dropdown.abort.response == "Abort") script.abort(true)
]
</surveypage>

<dropdown abort>
/ options = ("Keep going", "Abort")
/ defaultresponse = "Keep going"
</dropdown>

Yes, you can do this on a surveypage, but as noted before the attribute you need to use is /ontrialend, not /branch:

<surveypage fail>
/ caption = "You did not answer every question correctly. Please re-read the instructions" 
/ questions = [1=abort]
/ fontstyle = ("Arial", 20)
/ txcolor = white
/ nextbuttonposition = (-10%, -10%)
/ ontrialend = [
  if (dropdown.abort.response == "Abort") script.abort(true)
]
</surveypage>



GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search