Hi,

I rewrote the problem I have been working on so that it is now a custom 
response, but am having trouble getting it to properly grade the problem 
submission. This is the code for grading inside the answer block:
         if ($total_score == 1) { return 'EXACT_ANS'; }
           elsif ($total_score > 0) { return ('ASSIGNED_SCORE',$total_score); }
           else  { return 'INCORRECT'; }
         return ('ASSIGNED_SCORE',$total_score);

I have tried it with and without the second return statement, but either way 
the Correct/Partially Correct/Incorrect grading seems almost random. 
$total_score is computed in a perl script higher up in the program, and I am 
outputting it to verify that it is being computed correctly. I also have a 
retrypartial parameter at the top of the program because I want the students to 
be able to take three tries at it on the practice version:
<parameter name="retrypartial" type="string_yesno" description="Partially 
correct is answerable" default="yes" />

Can anyone see what I am doing wrong?

Thanks for any help/advice you can provide.

Best regards,

Gene L. Harding, PE
Associate Professor of ECET
574-520-4190

_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users

Reply via email to