[system] Repository:
ViewVC logotype

Revision 3704


Jump to revision: Previous Next
Author: jj
Date: Tue Oct 11 17:59:30 2005 UTC (14 years, 1 month ago)
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).

Changed paths:

Path Details
Directorytrunk/pg/macros/PGbasicmacros.pl modified , text changed

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9