Referencepretzel

<pretzel>

<pretzel> is a response component that lets students match statements to answers by entering a sequence.

In the simplest case (default mode and no distractors), students can start with any problem and enter 1 in that box. Then they find that problem’s answer and enter 2 in the box under the matching statement, continue to 3, and so on until all problems are used. The answer to the last problem should point back to the answer above the box where they started.

If the pretzel contains any distractor, neither the statement nor the answer of that box should match any other problem. In particular, a distractor’s answer should not be the correct answer to its own statement or to any other statement in the pretzel. Assuming that the student did not choose a distractor to start and did not make any mistakes, they will loop back to their initial problem without encountering any distractors. The boxes that remain are distractors and should be filled with an X. If a student starts with a distractor or enters a distractor due to a mistake, they should discover that there are no matching answers to the question. This indicates that the question is a distractor and should be marked with an X. If they arrived at that question from matching a previous answer, that should indicate to the student that they made a mistake when arriving at the previous answer.

Each <problem> in a pretzel should contain one <statement> and one <answer>.

Attributes and Properties

Attributes for <pretzel>
AttributeTypeValues
colorCorrectness = "…""true" "false"
disableAfterCorrect = "…"boolean"true" "false"
displayDigitsForCreditAchieved = "…"integer
displayDigitsForResponses = "…"integer
handGraded = "…"boolean"true" "false"
matchPartial = "…"boolean"true" "false"
maxNumAttempts = "…"integer
maxNumColumns = "…"integer
mode = "…"text"pretzel" "circuit"
showCorrectness = "…""true" "false"
submitLabel = "…"text
submitLabelNoCorrectness = "…"text
weight = "…"number
Props for <pretzel name="p">
PropertyType
$p.colorCorrectnessPreliminaryboolean
$p.creditAchievednumber
$p.currentResponses[ text ]
$p.disableAfterCorrectboolean
$p.disabledboolean
$p.disabledOriginalboolean
$p.displayDigitsForCreditAchievedinteger
$p.displayDigitsForResponsesinteger
$p.fixedboolean
$p.fixLocationboolean
$p.handGradedboolean
$p.hiddenboolean
$p.justSubmittedboolean
$p.matchPartialboolean
$p.maxNumAttemptsinteger
$p.maxNumColumnsinteger
$p.modetext
$p.numAttemptsLeftinteger
$p.numProblemsinteger
$p.numSubmissionsinteger
$p.numSubmittedResponsesnumber
$p.responseHasBeenSubmittedboolean
$p.submitLabeltext
$p.submitLabelNoCorrectnesstext
$p.submittedResponses[ text ]
$p.weightnumber

Example: Basic pretzel workflow

Students may begin at any non-distractor box with 1. In default pretzel mode, any consistent cyclic shift is accepted.


Attribute Example: <problem isDistractor>

If a problem has isDistractor, students must enter X in that box. A distractor answer should not correctly answer its own statement or any other statement in the pretzel. A student will enter numbers only for non-distractor problems.


Attribute Example: mode (default pretzel)

mode defaults to pretzel if omitted. In this mode, students can start anywhere and any consistent cyclic numbering pattern is accepted.


Attribute Example: mode="circuit"

In circuit mode, the first problem is fixed in the first position. The first input is prefilled with 1 and disabled. In circuit mode, the first <problem> cannot be a distractor; making it a distractor will produce an error.


Attribute Example: maxNumColumns

maxNumColumns controls the maximum number of displayed columns for the pretzel layout.