[LON-CAPA-users] assigned_score and unexpected results

Mills, Douglas G dmills at illinois.edu
Thu Mar 21 12:03:05 EDT 2019

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.



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!
    -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
    > http://mail.lon-capa.org/mailman/listinfo/lon-capa-users

More information about the LON-CAPA-users mailing list