ReferencecascadeMessage

<cascadeMessage>

Placeholder shown inside a `<cascade>` in place of a not-yet-revealed entry

<cascadeMessage> is a continuation placeholder shown inside a <cascade> when the next entry is still hidden. It takes the place of the not-yet-revealed entry until that entry becomes visible, at which point the message disappears.

Use <cascadeMessage> to give the learner a prompt — “Keep going”, “Solve the previous step to continue”, etc. — without revealing the content behind it.

A <cascade> shows one message at a time: the one belonging to the next entry, the entry that becomes visible as soon as the current one is completed. Entries further down show nothing until their turn comes.

Attributes and Properties

Attributes for <cascadeMessage>

Scoring (10)
aggregateScores

boolean. Default value: false. Whether to aggregate scores of scored descendants into a section credit-achieved value.

colorAnswersSeparately

boolean. Default value: false. When section-wide check work is enabled, color each answer based on its own correctness rather than the section's overall credit.

colorCorrectness

boolean. Default value: true. Whether to color-code the answers it contains based on correctness.

displayDigitsForCreditAchieved

integer. Default value: 3. Number of significant digits to display for the credit achieved value.

maxNumAttempts

integer. Default value: Infinity. Maximum number of times the section-wide check-work button can be submitted. Once reached, all enclosed answers are disabled.

sectionWideCheckWork

boolean. Default value: false. Whether to show a single section-wide check-work button instead of per-answer buttons.

showCorrectness

boolean. Default value: true. Whether to display correctness indicators for the answers it contains.

submitLabel

text. Default value: Check Work. Label for the section-wide submit button when correctness is shown.

submitLabelNoCorrectness

text. Default value: Submit Response. Label for the section-wide submit button when correctness is not shown.

weight

number. Default value: 1. Relative weight of this section when aggregated by an enclosing scored section.

Common to all components (9)
copy

reference. Create an independent copy of another component by reference. Enter a references a $name.

disabled

boolean. Default value: false. Whether this component is disabled and cannot be interacted with.

extend

reference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.

fixed

boolean. Default value: false. Whether this component's value is fixed and cannot be modified.

fixLocation

boolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

hide

boolean. Default value: false. Whether to hide this component from the rendered output.

isResponse

boolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.

name

text. The name used to reference this component from elsewhere in the document.

styleNumber

integer. Default value: 1. The style number used to select this component's visual styling from the available style definitions.

Properties for <cascadeMessage name="c">

Scoring (9)
$c.aggregateScores

boolean. Whether scores of scored descendants are aggregated into this section's credit value.

$c.colorCorrectness

boolean. Whether the answers this section contains are color-coded by correctness, after combining the attribute with any enclosing section's setting and with whether correctness is shown at all.

$c.displayDigitsForCreditAchieved

integer. Number of significant digits to display for the credit achieved value.

$c.maxNumAttempts

integer. Maximum number of times the section-wide check-work button can be submitted. Once reached, all enclosed answers are disabled.

$c.sectionWideCheckWork

boolean. Whether to show a single section-wide check-work button instead of per-answer buttons.

$c.showCorrectness

boolean. Whether correctness is shown for the answers this section contains, after combining the attribute with any enclosing section's setting and with the activity-wide flag.

$c.submitLabel

text. Label for the section-wide submit button when correctness is shown.

$c.submitLabelNoCorrectness

text. Label for the section-wide submit button when correctness is not shown.

$c.weight

number. Relative weight of this section when aggregated by an enclosing scored section.

Other (9)
$c.creditAchieved

number. Aggregate credit achieved (between 0 and 1) for scored descendants of this section.

$c.disabled

boolean. Whether this component is disabled and cannot be interacted with.

$c.fixed

boolean. Whether this component's value is fixed and cannot be modified.

$c.fixLocation

boolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

$c.hidden

boolean. Whether this component is hidden from the rendered output.

$c.numAttemptsLeft

integer. Remaining number of section-wide submissions before the maximum is reached.

$c.numSubmissions

integer. Number of times the section-wide check-work button has been submitted.

$c.percentCreditAchieved

number. Aggregate credit achieved as a percentage (between 0 and 100).

$c.text

text. The paragraph's text content.

Common to all components (4)
$c.doenetML

text. The DoenetML source code that produced this component.

$c.hide

boolean. Whether to hide this component from the rendered output.

$c.isResponse

boolean. Whether this component is treated as a response for the purposes of assessment.

$c.styleNumber

integer. The style number used to select this component's visual styling from the available style definitions.

Examples

Example: Between siblings of a <cascade>

While the first step is unanswered, the <cascadeMessage> appears in place of the still-hidden second step. Once the first step is answered correctly, the message disappears and Step 2 is revealed.


Example: Inside sections of a <cascade>

A <cascadeMessage> placed inside a hidden section serves as the prompt shown in place of that section’s body, so authoring one per section lets each section carry its own prompt. Only the next section shows its prompt: while Part 1 is unanswered, Part 2 shows “Finish Part 1 before continuing” and Part 3 shows only its title.

Of the two placements — nested inside a section, or a child of the <cascade> itself — a section’s own message is the more specific, so when the next section has one it is shown and any <cascadeMessage> child of the cascade itself stays hidden while it is. Nesting the message inside the section is also the only placement that survives a list layout — inside a <problems> or any other section with asList, only sectioning children are rendered, so a <cascadeMessage> child of the cascade would never appear.


Example: Single continuation tail

A single <cascadeMessage> placed at the end of the cascade serves as a generic “more to come” prompt that appears between any pair of still-hidden siblings, and disappears once every preceding child has been completed.