(Answer) (Category) LON-CAPA User Help : (Category) Authoring : (Category) Authoring Problems :
multiple correct answers for String Response problems using Regular Expressions
An example:

<problem>
<script type="loncapa/perl">
@answertext = ("big","huge","large");
$regexpans = join('|',@answertext);
$regexpans = '/^('.$regexpans.')\b/';</script>
<startouttext />Not small, but <endouttext />
<stringresponse answerdisplay="large, big, or huge" answer="$regexpans"
type="re">
<textline readonly="no">
</textline>
<hintgroup showoncorrect="no">
<startouttext /><endouttext />
</hintgroup>
</stringresponse>
</problem>
felicia@lon-capa.org
[Append to This Answer]
Previous: (Answer) Specifying wrong answers for exam mode
Next: (Answer) How can I use the quantity "pi" in a formularesponse?
This document is: http://help.loncapa.org/cgi-bin/fom?file=351
[Search] [Appearance] [Show This Answer As Text]
This is a Faq-O-Matic 2.719.
This FAQ administered by the LON-CAPA team at MSU. Submit a help request ticket to contact us.