Thanks. I think the easiest option is just to do manual grade reconciliation at the end of term, as this doesn't happen that often.
For some annoying reason, it was decided (by our registrar, perhaps?) that student ID numbers are information far too sensitive to be included in the LMS. Apparently they're in there somewhere, but at a level that is hidden from instructors. If we want student numbers we have to go into a different portal (which, of course, does not have the capability of producing a spreadsheet).
Students get assigned a Moodle ID number, which I think persists throughout the course, but isn't necessarily the same from course to course.