I’d like for the following behavior to occur but neither of my approaches seems to be working.
The user is shown a multiple choice question where part of the choice is only displayed if the user selects that choice. Below, I want to present the user with a math input box only if the user selects the particular choice but I am running into a circular dependency.
<problem>
<p>Which of the following is true of <m>x^2-1</m>? Select all that apply.</p>
<choiceInput>
<choice name="choice4">
The expression can be factored by using the difference of squares formula
<conditionalContent>
<case condition="$choice4.selected=true">
and it factors to <mathInput name="userInput1" />
</case>
<else>.</else>
</conditionalContent>
</choice>
</choiceInput>
</problem>
I’ve also tried the following but ran into a circular dependency again.
<setup>
<boolean name="c4selected">$choice4.selected</boolean>
</setup>
<problem>
<p>Which of the following is true of <m>x^2-1</m>? Select all that apply.</p>
<choiceInput>
<choice name="choice4">
The expression can be factored by using the difference of squares formula
<conditionalContent>
<case condition="$c4selected=true">
and it factors to <mathInput name="userInput1" />
</case>
<else>.</else>
</conditionalContent>
</choice>
</choiceInput>
</problem>