[LON-CAPA-users] Partial credit in custom response

Raeburn, Stuart raeburn at msu.edu
Tue Jan 12 11:24:09 EST 2021


HK,

To assign partial credit in a customresponse item, return 'ASSIGNED_SCORE', $score where $score is a number between 0 and 1, from within the <answer type="loncapa/perl"></answer> block when the student's submission satisfies your criteria for earning partial credit, but not full credit.

e.g., 

<customresponse answerdisplay="$answer" id="11">
<answer type="loncapa/perl">
if (abs($submission-$answer) < 0.00001) {
        return 'APPROX_ANS';     
} elsif (abs($submission-$answer) < 0.1) { 
        return ('ASSIGNED_SCORE',0.5);
}
return 'INCORRECT';
</answer>

There are three awards applied when the questiontype parameter in effect is a survey or anonymous survey, which are not listed in the "Full list of possible return codes" included in section 7.12 "Custom Response  Problems" in the Authoring Manual: SUBMITTED_CREDIT, ANONYMOUS, and ANONYMOUS_CREDIT.

LON-CAPA will automatically replace the award set by the customresponse item if it was one of INCORRECT, APPROX_ANS or EXACT_ANS, and in the case of the two *_CREDIT awards will award a score of 1.0, regardless of whether the student's submission was 'correct' or not.

The intent of SUBMITTED_CREDIT and ANONYMOUS_CREDIT is to assign credit to students for making a submission to a survey item (which could be any type of response item).  The questiontype parameter is used to assign a problem as survey, anonymous survey (with or without credit).

I have just committed a minor change to LON-CAPA so that for questiontype of survey with a customresponse which returns ASSIGNED_SCORE, the behavior will be the same as for INCORRECT, APPROX_ANS or EXACT_ANS. See: mail.lon-capa.org/pipermail/lon-capa-cvs/Week-of-Mon-20210111/029319.html

Stuart Raeburn
LON-CAPA Academic Consortium
________________________________________
From: LON-CAPA-users <lon-capa-users-bounces at mail.lon-capa.org> on behalf of H.K. Ng via LON-CAPA-users <lon-capa-users at mail.lon-capa.org>
Sent: Saturday, January 9, 2021 1:57 PM
To: Discussion list for LON-CAPA users
Subject: [LON-CAPA-users] Partial credit in custom response

Hi,

Is there a way to assign partial credit in customresponse? There are two parameters, 'SUBMITTED_CREDIT' and 'ASSIGNED_SCORE that would indicate that this is possible. If so, how are they used? Thanks.

Regards,
-hk



More information about the LON-CAPA-users mailing list