Traditional Answer Checkers - PGML

From WeBWorK_wiki
Revision as of 12:12, 12 May 2015 by Dpvc (talk | contribs) (Initial version)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Using Traditional Answer Checkers

The answer blanks in PGML usually use Category:MathObjects to provide the answer checkers for them, but you can also use the traditional answer checkers, like num_cmp() and str_cmp() in PGML. To do so, simply include the traditional-answer-checker function-call in the braces following the answer blank.

 $a = 3; $b = 5;
 The value of [: [$a] + [$b] :] is [________]{strict_num_cmp($a+$b)}

The traditional string answer checkers amy be useful to use, since they provide some options not available in MathObjects, and don't require setting up the context to include the desired strings.