[LON-CAPA-users] assigned_score and unexpected results

Mills, Douglas G dmills at illinois.edu
Wed Mar 20 11:22:18 EDT 2019

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!


Douglas Mills
Director of Instructional Technology
Department of Chemistry
University of Illinois

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.lon-capa.org/pipermail/lon-capa-users/attachments/20190320/726d365e/attachment-0001.html>

More information about the LON-CAPA-users mailing list