<shuffle>
<shuffle> is a Math Operator
component that re-orders a list of referenced components and creates document variants based on the different possible orders.
Attributes and Properties
Attributes for <shuffle>
Other (2)
asListboolean. Default value: true. Whether to render the items separated by commas (true) or with no separator (false).
typetext. Component type to shuffle children as.
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 <shuffle name="s">
Common to all components (4)
$s.doenetMLtext. The DoenetML source code that produced this component.
$s.hideboolean. Whether to hide this component from the rendered output.
$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: Shuffle a list of numbers
Four <number> components are defined and then re-ordered (which in turn creates document variants) using
the <shuffle> component.
Select a new page variant from the pulldown menu at the top of the editor to see different variants of the document.
Example: Shuffle an ordered list
Four <li> (list item) components are defined within an <ol> (ordered list) and then re-ordered using the <shuffle> component.
Select a new page variant from the pulldown menu at the top of the editor to see different variants of the document.
Example: Shuffle a <textList>
A named <textList> is defined, then re-ordered using the <shuffle> component.
Select a new page variant from the pulldown menu at the top of the editor to see different variants of the document.
Example: Shuffle rows in a <tabular>
The individual <row> components within a <table> can be re-ordered using the <shuffle> component.
Select a new page variant from the pulldown menu at the top of the editor to see different variants of the document.