version 1.1, 2009/05/24 13:08:27
|
version 1.2, 2009/07/06 17:12:47
|
Line 1
|
Line 1
|
<problem> |
<problem> |
<startouttext />Complete the sentence:<endouttext /> |
|
<customresponse id="11"> |
|
<notsolved> |
|
<startouttext /> |
|
The q<textline readonly="no" size="5" /> brown fox jum<textline readonly="no" size="3" /> over the <textline readonly="no" size="3" />zy d<textline readonly="no" size="3" />. |
|
<endouttext /> |
|
</notsolved> |
|
<solved> |
|
<startouttext /> |
<startouttext /> |
The q<b>uick</b> brown fox jum<b>ps</b> over the <b>la</b>zy d<b>og</b>. |
Complete the sentence: |
<endouttext /> |
<endouttext /> |
</solved> |
|
|
|
<answer type="loncapa/perl">@answer=('uick','ps','la','og'); |
<customresponse id="11"> |
|
<notsolved> |
|
<startouttext /> |
|
The q<textline readonly="no" size="5" /> brown fox jum<textline readonly="no" size="3" /> over the <textline readonly="no" size="3" />zy d<textline readonly="no" size="3" />. |
|
<endouttext /> |
|
</notsolved> |
|
<solved> |
|
<startouttext /> |
|
The q<b>uick</b> brown fox jum<b>ps</b> over the <b>la</b>zy d<b>og</b>. |
|
<endouttext /> |
|
</solved> |
|
<answer type="loncapa/perl"> |
|
@answer=('uick','ps','la','og'); |
$correct=0; |
$correct=0; |
for ($i=0;$i<=$#$submission;$i++) { |
for ($i=0;$i<=$#$submission;$i++) { |
$$submission[$i]=~s/\s//gs; |
$$submission[$i]=~s/\s//gs; |
Line 20 for ($i=0;$i<=$#$submission;$i++) {
|
Line 24 for ($i=0;$i<=$#$submission;$i++) {
|
} |
} |
if ($correct==$#answer+1) { return 'EXACT_ANS'; } |
if ($correct==$#answer+1) { return 'EXACT_ANS'; } |
if ($correct==0) { return 'INCORRECT'; } |
if ($correct==0) { return 'INCORRECT'; } |
return('ASSIGNED_SCORE',$correct/($#answer+1));</answer> |
return('ASSIGNED_SCORE',$correct/($#answer+1)); |
|
</answer> |
</customresponse> |
</customresponse> |
</problem> |
|
|
|
|
|
|
</problem> |