<solution>
<solution> is a Sectional component whose function is to display an explanation or problem solution.
Attributes and Properties
Attributes for <solution>
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 the solution is initially hidden.
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 <solution name="s">
Other (5)
$s.disabledboolean. Whether this component is disabled and cannot be interacted with.
$s.fixedboolean. Whether this component's value is fixed and cannot be modified.
$s.fixLocationboolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
$s.openboolean. Whether the solution is currently open (revealed).
Common to all components (4)
$s.doenetMLtext. The DoenetML source code that produced this component.
$s.hideboolean. Whether the solution is currently hidden.
$s.isResponseboolean. Whether this component is treated as a response for the purposes of assessment.
$s.styleNumberinteger. The style number used to select this component's visual styling from the available style definitions.
Examples
Example: Default <solution>
A <solution> is placed within a <problem>. Authors can control the conditions under which solutions may be viewed by students in the document-wide settings.