Dependent Multiple Choice questions
I'm currently setting up a questionnaire in OpenSesame. It contains some Multiple Choice questions that are dependent from each other in the following sense:
I have a question “1”. Possible answers are "a", "b", "c", "d". Now if the subject selects "a", the experiment continues with question 2. If the subject selects answers "b", "c" or "d", then a question 1b must be answered.
A picture of the sequence to make it more clear:
I tried to solve this problem with inline scripts the following way: I made an overall sequence which contains many sequences. Those all contain a single inline script with either a question 1, 2, 3, etc. or a question 1, 2, 3 AND a question 1b, 2b, 3b, etc. These "b-items" are only presented when the previous question was answered with “b”, “c”, or “d”. So far, so good. The problem I have now is that the question that has been answered already is displayed completely new (the subject has to answer it again, first answer is overwritten). What I would like to have is that the participant’s answer to the first question (the one which he already answered and led to the display of the “b”-question) is already selected on the page where the “b”-question appears. So that it looks as if it wasn't a new page but the "b-item" is displayed on the same page additionally.
This is the code I am using in the "b-items":
def form_validator(): options = [0,1,2,3] return var.q01b in options title = Label(text=u'title') q1 = Label(text=u'question1', center=False) q2 = Label(text=u'question1b', center=False) ratingScale1 = RatingScale( var=u'q01', nodes=[u'a', u'b', u'c', u'd'] ) ratingScale2 = RatingScale( var=u'q01b', nodes=[u'a', u'b', u'c', u'd'] ) nextButton = Button(text=u'Weiter') form = Form(validator=form_validator, rows=[1,1,1,1], cols=[4,7], margins=(10,40,10,40), spacing=25) form.set_widget(title, (0, 0), colspan=2) form.set_widget(q1, (0, 1)) form.set_widget(ratingScale1, (1, 1)) form.set_widget(q2, (0, 2)) form.set_widget(ratingScale2, (1, 2)) form.set_widget(nextButton, (0, 3), colspan=2) form._exec()
Is there any solution to this problem? Thank you in advance,