Rex, Damyon, thank you very much. I learned a lot from your codes even if I never had a look at the grade-report-code itself.
I like the idea of sending only a link to the grade-report. But finally it is redundant, isn't it?
I have a whole university that keeps ALL the grades of their students inside a Moodle course so that every student and all teachers can look at them at any moment. Students of course can only see their own grades for privacy reasons. They do a clever trick by importing the grades of exams and other graded activities not being part of any Moodle course adding even all the grades of every single Moodle course to build a big Excel or CSV table and then import the data to the grades of one course so as to offer access by web to the students. And the teachers can correct the grades at any time online.
Again, sending such a report to every student on a weekly basis could be an option, even if the built in online solution should be enough.
I know teachers and admins can import/export the grade report, but at a first glance I miss such an option for the students. Did I miss it or would it be a simpler extension to program?