NAME

PGmiscevaluators.pl - Some miscellaneous answer macros.

DESCRIPTION

Currently contains answer evaluators for radio buttons and checkboxes.

The parserRadioButtons.pl and parserCheckboxList.pl macros that manage display and checking of radio-button and checkbox based answers. It is recommended that you use those, instead of using the methods in this file.

FUNCTIONS

checkbox_cmp

ANS(checkbox_cmp($correctAnswer))

$correctAnswer is a string containing the names of the correct boxes, e.g. "ACD". Note that this means that individual checkbox names can only be one character. Internally, this is largely the same as unordered_cs_str_cmp().

Note: See parserCheckboxList.pl for an alternative to this.

radio_cmp

ANS(radio_cmp($correctAnswer))

$correctAnswer is a string containing the name of the correct radio button, e.g. "Choice1". This is case sensitive and whitespace sensitive, so the correct answer must match the name of the radio button exactly.

Note: See parserRadioButtons.pl for an alternative to this.

SEE ALSO

PGanswermacros.pl, UsingMathObjects.