aborting experiment conditional on response


Author
Message
nrouhani
nrouhani
Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)
Group: Forum Members
Posts: 34, Visits: 162
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 (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)
Group: Administrators
Posts: 10K, Visits: 60K
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
Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)
Group: Forum Members
Posts: 34, Visits: 162
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 (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)
Group: Administrators
Posts: 10K, Visits: 60K
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
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 13, Visits: 31

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