Referenceobjectives

<objectives>

A section listing learning objectives

<objectives> is a Sectional component that renders a block of learning objectives — the intended outcomes of a section, lesson, or activity. It behaves like <section> (with auto-generated or custom title and sectional counter), but is rendered as a boxed block by default to help it stand out.

Attributes and Properties

Attributes for <objectives>

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.

Other (17)
asList

boolean. Default value: false. Whether to render this section's children as a list.

boolean. Default value: true. Whether to render this section with a visible box around it.

collapsible

boolean. Default value: false. Whether the section can be collapsed and expanded.

completedColor

text. Default value: var(--lightGreen). Color used to indicate this section has been completed.

completedColorDarkMode

text. Default value: #1a5e20. Color used to indicate this section has been completed (dark mode). If omitted, the dark-mode color is derived from completedColor when that attribute is explicitly set; otherwise falls back to a dark green that meets WCAG AA contrast for white text.

includeAutoName

boolean. Default value: false. Whether to include the auto-generated section name (e.g. "Section") in the rendered title.

includeAutoNameIfNoTitle

boolean. Default value: true. Whether to include the auto-generated name when no explicit title is provided.

includeAutoNumber

boolean. Default value: false. Whether to include the auto-generated section number in the rendered title.

includeAutoNumberIfNoTitle

boolean. Default value: true. Whether to include the auto-generated number when no explicit title is provided.

includeParentNumber

boolean. Default value: false. Whether to prefix this section's number with the parent section's number.

inProgressColor

text. Default value: var(--mainGray). Color used to indicate this section is in progress.

inProgressColorDarkMode

text. Default value: #3a3a3a. Color used to indicate this section is in progress (dark mode). If omitted, the dark-mode color is derived from inProgressColor when that attribute is explicitly set; otherwise falls back to a dark gray that meets WCAG AA contrast for white text.

level

integer. The heading level for this section (overrides the default level inferred from nesting).

noAutoTitle

boolean. Default value: false. Whether to suppress the auto-generated title entirely.

notStartedColor

text. Default value: var(--mainGray). Color used to indicate this section has not been started.

notStartedColorDarkMode

text. Default value: #3a3a3a. Color used to indicate this section has not been started (dark mode). If omitted, the dark-mode color is derived from notStartedColor when that attribute is explicitly set; otherwise falls back to a dark gray that meets WCAG AA contrast for white text.

startOpen

boolean. Default value: true. Whether the collapsible section starts in the open state.

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).

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 <objectives name="o">

Scoring (7)
$o.aggregateScores

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

$o.displayDigitsForCreditAchieved

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

$o.maxNumAttempts

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

$o.sectionWideCheckWork

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

$o.submitLabel

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

$o.submitLabelNoCorrectness

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

$o.weight

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

Other (20)
$o.asList

boolean. Whether to render this section's children as a list.

$o.boxed

boolean. Whether this section is rendered with a visible box around it.

$o.collapsible

boolean. Whether the section can be collapsed and expanded.

$o.creditAchieved

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

$o.disabled

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

$o.fixed

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

$o.fixLocation

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

$o.hidden

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

$o.includeAutoName

boolean. Whether to include the auto-generated section name (e.g. "Section") in the rendered title.

$o.includeAutoNameIfNoTitle

boolean. Whether to include the auto-generated name when no explicit title is provided.

$o.includeAutoNumber

boolean. Whether to include the auto-generated section number in the rendered title.

$o.includeAutoNumberIfNoTitle

boolean. Whether to include the auto-generated number when no explicit title is provided.

$o.includeParentNumber

boolean. Whether to prefix this section's number with the parent section's number.

$o.noAutoTitle

boolean. Whether to suppress the auto-generated title entirely.

$o.numAttemptsLeft

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

$o.numSubmissions

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

$o.open

boolean. Whether this section is currently open (for collapsible sections).

$o.percentCreditAchieved

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

$o.sectionNumber

text. The displayed number for this section.

$o.title

text. The displayed title text for this section.

Common to all components (4)
$o.doenetML

text. The DoenetML source code that produced this component.

$o.hide

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

$o.isResponse

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

$o.styleNumber

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

Examples

Example: <objectives> with default title

When <objectives> has no <title>, an auto-generated title (e.g. Objectives 1) is rendered. The block is boxed by default.


Example: <objectives> with custom title

A custom <objectives> title is provided by nesting a <title> component.

Attribute Examples

Attribute Example: boxed

Unlike most other sectional components, <objectives> has boxed set to true by default. Set boxed="false" to render it as a plain section without a border or shaded banner.


Attribute Example: hide

The hide attribute takes a boolean as input and can be used with any rendered component.