I managed to change the quiz preview to a real and graded attempt by:
- Removing the Manager role for the student in the course - the student certainly doesn't need it. Nobody will admit to adding it!
- Changing the mdl_quiz_attempts.preview value in the Moodle database for the attempt from 1 to 0.
- Regrading the quiz attempt.
The attempt now shows in the quiz attempts list and the grade was written to the gradebook.
On Monday morning I'll give everyone a lecture about not giving any students the STUDENT AND MANAGER roles in a course.
Thanks everyone...