File:
[LON-CAPA] /
loncom /
homework /
templates /
custompartial.problem
Revision
1.4:
download - view:
text,
annotated -
select for diffs
Thu Dec 15 01:21:45 2011 UTC (12 years, 8 months ago) by
raeburn
Branches:
MAIN
CVS tags:
version_2_11_2_uiuc,
version_2_11_2_msu,
version_2_11_2_educog,
version_2_11_2,
version_2_11_1,
version_2_11_0_RC3,
version_2_11_0_RC2,
version_2_11_0_RC1,
version_2_11_0,
HEAD,
BZ4492-merge,
BZ4492-feature_horizontal_radioresponse,
BZ4492-feature_Support_horizontal_radioresponse,
BZ4492-Support_horizontal_radioresponse
- Bug 2802.
- Separate decision on leniency in grading from logic on whether additional
new submission is possible for partially correct problem parts.
- new parameter: retrypartial set to "yes" if part is to be answerable
when partially correct.
- custompartial.problem template incorporates retrypartial parameter in
place of lenient parameter.
- points awarded > 1 no longer considered 'partially correct'.
- &grading_is_nonlenient() moved from inputtags.pm back to optionresponse.pm
<problem>
<parameter name="lenient" type="string_yesno" description="Partially correct is answerable" default="yes" />
<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 />
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;
for ($i=0;$i<=$#$submission;$i++) {
$$submission[$i]=~s/\s//gs;
if ($$submission[$i] eq $answer[$i]) { $correct++; }
}
if ($correct==$#answer+1) { return 'EXACT_ANS'; }
if ($correct==0) { return 'INCORRECT'; }
return('ASSIGNED_SCORE',$correct/($#answer+1));
</answer>
</customresponse>
</problem>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>