| Log Message: |
Added syntactic sugar for pop_up_lists.
A common situation is that a problem includes a short multiple-choice question along with other answers. Often, these questions are written as fill-in-the-blank where the student is told a list of legal words to put in the blanks. The idea is to make it as simple as possible for problem writers to replace the fill-in-the-blank with a drop-down list of alternatives.
So, now the text of a problem can contain
is the function increasing on [0,1]? \{ pop_up_list(['?', 'yes', 'no']) \}
instead of
is the function increasing on [0,1]? \{ pop_up_list('?' => '?', 'yes' => 'yes', 'no' => 'no') \}
The result is checked with something like
ANS(str_cmp('yes'));
Existing problems are unaffected since the added syntax uses a reference to a list (the extra square brackets).
|