Annotation of loncom/homework/templates/custompartial.problem, revision 1.5

1.1       www         1: <problem>
1.5     ! raeburn     2:  <parameter name="retrypartial" type="string_yesno" description="Partially correct is answerable" default="yes" />
1.2       bisitz      3: 
                      4: <startouttext />
                      5: Complete the sentence:
                      6: <endouttext />
                      7: 
1.1       www         8: <customresponse id="11">
1.2       bisitz      9:     <notsolved>
                     10:         <startouttext />
1.1       www        11: 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" />.
1.2       bisitz     12:         <endouttext />
                     13:     </notsolved>
                     14:     <solved>
                     15:         <startouttext />
1.1       www        16: The q<b>uick</b> brown fox jum<b>ps</b> over the <b>la</b>zy d<b>og</b>.
1.2       bisitz     17:         <endouttext />
                     18:     </solved>
                     19:     <answer type="loncapa/perl">
                     20: @answer=('uick','ps','la','og');
1.1       www        21: $correct=0;
                     22: for ($i=0;$i<=$#$submission;$i++) {
                     23:     $$submission[$i]=~s/\s//gs;
                     24:     if ($$submission[$i] eq $answer[$i]) { $correct++; }
                     25: }
                     26: if ($correct==$#answer+1) { return 'EXACT_ANS'; }
                     27: if ($correct==0) { return 'INCORRECT'; }
1.2       bisitz     28: return('ASSIGNED_SCORE',$correct/($#answer+1));
                     29:     </answer>
1.1       www        30: </customresponse>
1.2       bisitz     31: 
1.1       www        32: </problem>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>