Features & Development

request Question-Answer-Explanation

Re: request Question-Answer-Explanation

by Dick Lane -
Number of replies: 0
The attached example incorporates Davide's remark that MathObjects stuff is apt to be superfluous for forced-choice  (multiple-choice, match, select) tasks.

The POD Documentation for ChoiceList concludes by saying "cmp
        Usage    ANS($ml -> cmp);
provides a MathObject like comparison method
returns a string of comparison methods for checking the list object"

If I replace
    ANS( str_cmp( $tf -> ra_correct_ans ) ) ;
with
    ANS( $tf -> cmp() ) ;
the error message is

Variable 'F' is not defined in this context; see position 1 of formula at line 358 of [PG]/lib/ChoiceList.pm
  Died within ChoiceList::cmp called at line 37 of (eval 91702)

I'm content to stay with an old-style checker that works, but don't want to overlook possible improvements.