By no means do I mean manually iterate, you would create an algorithm to do it.
Number of courses is irrelevant if you are automating, unless you have a strict time constraint.
Currently I run a report on a tine dual core instance, no real horse power, and iterate through ~1000 courses including all assignments and submissions in < 15 min.
The report iterates through ~1000 courses including all assignments and all submissions in < 15 min.
Multiply by how many 1000's of courses you have.
However, thinking a bit further, have you looked at the data portal?
Take a look at the quiz schemas, I am sure you could derive your reports from this data:
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.