[LON-CAPA-users] multiple correct responses
H. K. Ng
lon-capa-users@mail.lon-capa.org
Mon, 12 Sep 2005 12:38:25 -0400
--=====================_20372156==.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed
Yes, you can use stringresponse of type regular expression. In your case try
$re = '/^\s*(\QW1\E|\QN12\E)\s*$/i';
-hk
At 12:09 PM 9/12/2005, you wrote:
>I have a string response question that has several possible correct
>answers. Is there some way to code this into a loncapa problem?
>For example, I would like to accept either "W1e" or "N12" as correct answers.
>
>Sorry if this is discussed somewhere but I have not found it in the
>author's manual or help site.
>
>Thnx,
>JMS
>
>James M. Sullivan, Assistant
>Professor
><mailto:jmsullivan@vcu.edu>jmsullivan@vcu.edu
>Department of Physics Virginia
>Commonwealth University
>tel:
>804/828-6343
>fax: 804/828-7073
>
>1020 W. Main St.
>PO BOX 842000
>Richmond, VA 23284-2000
>
>*
>"If you can drive a nail, and if you have any nails to drive, drive them."
> - H. D. Thoureau, 1850
>*
>
--=====================_20372156==.ALT
Content-Type: text/html; charset="us-ascii"
<html>
<body>
Yes, you can use stringresponse of type regular expression. In your case
try<br><br>
$re = '/^\s*(\QW1\E|\QN12\E)\s*$/i';<br><br>
-hk<br><br>
At 12:09 PM 9/12/2005, you wrote:<br>
<blockquote type=cite class=cite cite=""><font face="arial" size=2>I have
a string response question that has several possible correct answers. Is
there some way to code this into a loncapa problem?<br>
For example, I would like to accept either “W1e” or “N12” as correct
answers.<br>
<br>
Sorry if this is discussed somewhere but I have not found it in the
author’s manual or help site.<br>
<br>
Thnx,<br>
JMS<br>
<br>
James M. Sullivan, Assistant
Professor
<a href="mailto:jmsullivan@vcu.edu">jmsullivan@vcu.edu</a><br>
Department of
Physics
Virginia Commonwealth University<br>
tel:
804/828-6343
fax: 804/828-7073<br>
<br>
1020 W. Main St.<br>
PO BOX 842000<br>
Richmond, VA 23284-2000<br>
<br>
*<br>
"If you can drive a nail, and if you have any nails to drive, drive
them." <br>
- H. D. Thoureau,
1850<br>
* <br>
</font><font face="Times New Roman, Times"> </font></blockquote>
</body>
</html>
--=====================_20372156==.ALT--