ReferenceconsiderAsResponses

<considerAsResponses>

Marks its children as response components for an enclosing answer

<considerAsResponses> is an Evaluation component that informs Doenet which component to designate as a “response”. This is not required for correct answer evaluation, but can help disambiguate user response data for instructor review.

There is no need to use <considerAsResponses> in the following common situations:

  • the <answer> tag does not have any <award> children
  • the <answer> tag has a nested <mathInput/>, <textInput/>, <choice> or <choiceInput/>
  • the <answer> tag does have <award> children, but in all cases there is only one available component referenced that could be considered a response (In this case, the single component reference is automatically processed as the “response”, so there is no need for the <considerAsResponses> tag clarification.)

However, it is good practice to use the <considerAsResponses> in the following situations:

  • an <award> child is used with the <answer> tag, and multiple components are referenced within the <award> (not all of which are “responses”)
  • no nested input components are used within the <answer> tag, and there is ambiguity in the submitted response data

Attributes and Properties

Attributes for <considerAsResponses>

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 <considerAsResponses name="c">

Other (4)
$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.

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: <considerAsResponses> for graphical component

The <considerAsResponses> component designates which graphical element Doenet should store as a response for the named <answer>. Without designating $A as the response, both data for points $A and $B will appear in the Submitted response tab.

You can test this behavior by answering the question on the right-hand side and clicking the blue “Check Work” button. Then, click where it says “1 Submitted response” in the bottom of the editor panel on the left-hand side.


Example: <considerAsResponses> for multiple components

The <considerAsResponses> tag can contain multiple component references and can also refer to component properties.

Without the <considerAsResponses> specification as shown, data for $animal, $bestAnimal, $ptDist.length and $circ.radius will all appear in the Submitted response tab.

You can test this behavior by answering the question on the right-hand side, and then click where it says “1 Submitted response” in the bottom of the editor panel on the left-hand side.