Thanks Bob for clearing that up.
I think I understand my problem a little better now (but still no solution!). We have bought a block which interfaces with our school SIMS system timetable and allows us to enrol students in class groups. This block also seems to sometimes un-enrol students without an apparent reason. We had noticed this problem but not connected it with the problem of grades not appearing in the gradebook.
What we saw was that students had feedback on their assignments when they looked at the directly but the gradebook reports didn't show some or all grades. I now THINK that what has happened is students have become un-enrolled and then were re-enrolled. Later we noticed that the grades were not present in the gradebook.
So far as I know, recovery of grades on re-enrolment hasn't been fixed so I'd be really grateful for any suggestions on ways to get summary reports of grades for students and teachers.
Our teachers want to be able to show OFSTED their grading records using the moodle report so it's not very helpful when grades are missing!