I’d like to create fill-in-the-blank problems that can accept a variety of answers. I’ve figured out how to
use contextString.pl (and also contextABCD.pl) to do this, but when you are creating your own vocabulary
with
Context("String")->strings->add(word=>{}, synonym=>{alias=>”word”});
, it’s not clear how to me how to add more synonyms. I’ve tried:
Context("String")->strings->add(word=>{}, (synonym1, synonym2) =>{alias=>”word”});
Context("String")->strings->add(word=>{}, [synonym1, synonym2] =>{alias=>”word”});
and a few other variants of the above, but no dice.
In general, I’d like to know how to access the student answer directly. I understand that the benefit of Math Objects is that it abstracts away the process of having to read in the student input and compare the answer, but I’m hoping to learn enough Perl to be able to write a subroutine that can read in that input and compare or manipulate that student answer.