
|
|
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: |
|
| Next: |
|
| ||||||||||