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