aborting experiment conditional on response


Author
Message
nrouhani
nrouhani
Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)
Group: Forum Members
Posts: 83, Visits: 261
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 (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: 12K, Visits: 98K
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
Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)
Group: Forum Members
Posts: 83, Visits: 261
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 (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: 12K, Visits: 98K
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>



James Rounds
James Rounds
Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)
Group: Forum Members
Posts: 20, Visits: 80

Thank you - this is exactly what I was looking for!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search