Skip to main content
Version: v1.0.5

ComponentBlockCondition

The ComponentBlockCondition interface is used to define a SkipCondition based on the number of correct or incorrect components in a block. All answers on all components in the block are checked.

Answers are checked against the correct answers defined in the IndividualComponent's CorrectAnswer. If no correct answers are defined, the component is considered correct by default.

You might use this if a participant answers two questions in a block incorrectly. Here's an example of how to use the ComponentBlockCondition:

{
...
"skip": [
{
"check": "block",
"condition": "numIncorrect",
"value": 2,
"to": "end"
}
]
...
}

In this example, when the number of components with incorrect responses in the block is two, the participant will be redirected to the end of the study. If the number of incorrect responses is less than two, the participant will continue to the next component in the sequence.

When the condition is met, the participant will immediately be redirected to the component or block specified in the "to" property. If no conditions are met, the participant will continue to the next component in the sequence.

Properties

PropertyTypeDescription
check"block"The check we'll perform.
condition"numCorrect" | "numIncorrect"The condition to check.
tostringThe id of the component or block to skip to
valuenumberThe number of correct or incorrect responses to check for.