At the moment, individual attempt scores are stored in the database exactly, and only rounded when displayed to the student. However, when the quiz computes the student's final grade, it rounds it to the number of decimal points points specified in the quiz setting before the grade is stored in the database. Therefore the rounded grade is passed to the gradebook. In the words of one of the testers:
I actually scored 4.25 out of 7. In the quiz definition form I have set 'Decimal digits in grades' to 0. So the overall score is shown as '4 out of 7' 61%. 4.25/7 is 61%. So far, so good. But the value that is sent to the Gradebook is 57%. 4/7 is 57%. I don't think that this is right. I think it should send 61% and that 'Decimal digits in grades' should just give control over appearance, and have no effect on the underlying calculation.(The 61% figure appears on the attempt review page:
Grade 5 out of a maximum of 7 (61%))
I am inclined to agree with Phil, but I wondered what everyone else thought. I suppose the other option is to change the review page to show the percentage computing using the rounded grade.
(Interestingly, the code rounds the final grade again whenever it is read from the database, so it would be very easy to change it to store unrounded grades in the quiz_grades table.)