[LON-CAPA-users] assigned_score and unexpected results

Raeburn, Stuart raeburn at msu.edu
Thu Mar 21 12:38:15 EDT 2019


Doug,

Yes, you can assign a score of 0 to the six customresponse items which you simply use as placeholders.
So for those six return (ASSIGNED_SCORE,0) for each.

Then for the customresponse item for which you actually check submissions do:

if($submission eq "12|3"){return (ASSIGNED_SCORE,7)}; #12|3 means all words found and no hints used, etc.
if($submission  eq "12|2"){return (ASSIGNED_SCORE,98/15)};
if($submission  eq "12|1"){return (ASSIGNED_SCORE,91/15)};
if($submission  eq "12|0"){return (ASSIGNED_SCORE,84/15)};

In this case, if 12|1 is submitted, the value assigned to resource.$id.awarded will be:

(91/15 + 0 + 0 + 0 + 0 + 0 + 0)/7

which will be 13/15, which when you apply a weight of 5 will become: 4.33333333, as desired.

Stuart Raeburn
LON-CAPA Academic Consortium

________________________________________
From: LON-CAPA-users <lon-capa-users-bounces at mail.lon-capa.org> on behalf of Mills, Douglas G <dmills at illinois.edu>
Sent: Thursday, March 21, 2019 12:03 PM
To: Discussion list for LON-CAPA users
Cc: Mills, Douglas G
Subject: Re: [LON-CAPA-users] assigned_score and unexpected results

Ok, so re-reading Stuart's response I see why assigning scores of 0 to the 6 irrelevant responses doesn't solve the problem (but in fact makes it worse) -- the sum total of all responses in the part is 1, so there is no way to make the value of one out of 7 responses equal to 1/5 the points...  All becoming clearer now. Thank you.


Doug



Douglas Mills

Director of Instructional Technology

Department of Chemistry

University of Illinois




On 3/20/19, 9:40 PM, "Mills, Douglas G" <dmills at illinois.edu> wrote:

    Thanks Stuart. I knew I was missing something. I thought that the weight parameter could be applied to individual responses like sig fig and tolerance parameters can. However,
    understanding what’s happening I think I can work things out to the outcome I’m looking for.

    OR the other 6 responses are also all customresponses. If I used assign_score in each of those responses to give a score of zero, would the Lon-Capa assume the answers are incorrect?

    (The other answers are just storing data to restore the puzzle when the page reloads, so are set up to always be correct.)

    Thanks as always!
    Doug

    -sent from mobile-

    > On Mar 20, 2019, at 8:59 PM, Raeburn, Stuart <raeburn at msu.edu> wrote:
    >
    > Doug,
    >
    > You stated: "... is a one-part problem with 7 customresponses", and "All of the other 6 customresponses are weighted at 0."  Could you clarify how the "weighted at 0" is implemented?
    >
    > If the award is: "ASSIGNED_SCORE", then during grading LON-CAPA will loop over all the response items in the problem part, accumulate the awarded value for each, and then divide by the number of response items to calculate the value to store for resource.$id.awarded.
    >
    > The points shown with then be the weight * resource.$id.awarded.  (Weights apply to problem parts).
    >
    > So, if you have 7 response items, and return (ASSIGNED_SCORE,1) for 6 of those, and return ASSIGNED_SCORE,13/15) for the seventh, then the value of resource.$id.awarded will be:
    >
    > (13/15 + 1 + 1 + 1 + 1 + 1 + 1 )/7
    >
    > which evaluates to: 0.9809524
    >
    > When multiplied by a weight of 5, the result is: 4.904762, which is what you were seeing in course context/
    >
    > Stuart Raeburn
    > LON-CAPA Academic Consortium
    >
    > ________________________________________
    > From: LON-CAPA-users <lon-capa-users-bounces at mail.lon-capa.org> on behalf of Mills, Douglas G <dmills at illinois.edu>
    > Sent: Wednesday, March 20, 2019 11:22 AM
    > To: Discussion list for LON-CAPA users
    > Cc: Mills, Douglas G
    > Subject: [LON-CAPA-users] assigned_score and unexpected results
    >
    > Hi All,
    >
    > I have a word search activity implemented in Lon-Capa worth 5 course points if completed with no hints. There are 12 words to find plus 3 "starter points" that you can spend on 3 different hints for a total of 15 possible points. In the course parameters I've weighted the activity to 5 points. In the activity itself I've used assigned_score as follows:
    >
    > if($submission eq "12|3"){return (ASSIGNED_SCORE,15/15)}; #12|3 means all words found and no hints used, etc.
    > if($submission  eq "12|2"){return (ASSIGNED_SCORE,14/15)};
    > if($submission  eq "12|1"){return (ASSIGNED_SCORE,13/15)};
    > if($submission  eq "12|0"){return (ASSIGNED_SCORE,12/15)};
    >
    > My expectation then, for example, is that if I complete the puzzle using two hints, in the course I should see 4.333 points awarded.  However, what I'm seeing in the course for that outcome is a score of 4.90476190476191 out of 5.
    >
    > The Word Search problem itself is a one-part problem with 7 customresponses; however, the score should be coming from only the customresponse with the assigned_score section shown above. All of the other 6 customresponses are weighted at 0.
    >
    > So what am I missing?  Thanks!
    >
    > Doug
    >
    > Douglas Mills
    > Director of Instructional Technology
    > Department of Chemistry
    > University of Illinois
    > _______________________________________________
    > LON-CAPA-users mailing list
    > LON-CAPA-users at mail.lon-capa.org
    > https://urldefense.proofpoint.com/v2/url?u=http-3A__mail.lon-2Dcapa.org_mailman_listinfo_lon-2Dcapa-2Dusers&d=DwIGaQ&c=nE__W8dFE-shTxStwXtp0A&r=VsGo3jOm8tGLd6f-KlhT-g&m=YVDSvZV0RMr3redRHO3xBJpZT6WUHhwS9bRmqiIneQ8&s=1nHl7TzbUBYOfgRD2TysPzEnDk6SH7ZBNN_6PRlMbgg&e=


_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users at mail.lon-capa.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__mail.lon-2Dcapa.org_mailman_listinfo_lon-2Dcapa-2Dusers&d=DwIGaQ&c=nE__W8dFE-shTxStwXtp0A&r=VsGo3jOm8tGLd6f-KlhT-g&m=YVDSvZV0RMr3redRHO3xBJpZT6WUHhwS9bRmqiIneQ8&s=1nHl7TzbUBYOfgRD2TysPzEnDk6SH7ZBNN_6PRlMbgg&e=


More information about the LON-CAPA-users mailing list