Reply To: Exit button

PennController for IBEX Forums Support Exit button Reply To: Exit button



I’m trying to modify this to have a button that continues the experiment if they say yes to the consent form and stops the experiment if they say no. (Our online consent form is supposed to have the no option, not just assume they will just exit).

I have an attempt, but it doesn’t run. I think what I’m confused about is how to end the whole experiment, not just the trial.

    newHtml("Consent", "consent.html")
    newCanvas("consent_answers", '75vw', '80vh')
        .add("center at 50%", "middle at 25%", 
            newText("I have read this informed consent document and the material contained \
            in it has been explained to me verbally. All my questions have been answered, \
            and I freely and voluntarily choose to participate."))
        .add("center at 50%", "middle at 75%", 
            newScale("agree", "I want to participate in this study.", 
            "I do not wish to participate in this study.")
    newButton("stop", "Stop").callback(
            .print("center at 50vw", "middle at 50vh")
        getScale("agree").test.selected("I do not wish to participate in this study")
        //exit the experiment if they say no, continue if they say yes
    .print("right at 98vw","bottom at 98vh")