<case>
<case> is a Logic
component that defines an individual block of content triggered when
its condition is met within a <conditionalContent>.
Attributes and Properties
Attributes for <case>
Other (1)
boolean. Boolean expression; this case is selected when the condition is true.
Common to all components (9)
copyreference. Create an independent copy of another component by reference. Enter a references a $name.
disabledboolean. Default value: false. Whether this component is disabled and cannot be interacted with.
extendreference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.
fixedboolean. Default value: false. Whether this component's value is fixed and cannot be modified.
fixLocationboolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
hideboolean. Default value: false. Whether to hide this component from the rendered output.
isResponseboolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.
nametext. The name used to reference this component from elsewhere in the document.
styleNumberinteger. Default value: 1. The style number used to select this component's visual styling from the available style definitions.
Properties for <case name="c">
Other (5)
boolean. Whether this case's condition is currently satisfied.
$c.disabledboolean. Whether this component is disabled and cannot be interacted with.
$c.fixedboolean. Whether this component's value is fixed and cannot be modified.
$c.fixLocationboolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
Common to all components (4)
$c.doenetMLtext. The DoenetML source code that produced this component.
$c.hideboolean. Whether to hide this component from the rendered output.
$c.isResponseboolean. Whether this component is treated as a response for the purposes of assessment.
$c.styleNumberinteger. The style number used to select this component's visual styling from the available style definitions.
Examples
Example: <case> inside of <conditionalContent>
Each <case> component defines content that is only rendered
when the specified condition attribute is true.
Attribute Examples
Attribute Example: condition
Each <case> component defines content that is
only rendered when the specified condition attribute is true.
Property Examples
Property Example: conditionSatisfied
The conditionSatisfied property returns true if the specified <case> evaluates to true, and false otherwise.