This is a patch (gradebookexport_multicourse.patch) which refactors the gradebook export code.
Currently the export code is tied to a single course and it makes it impossible to have grades from activities in different courses in the same spreadsheet. This patch turns this single course into an array of courses.
The second patch (globalgrades_admin_report.patch) is a an example of what could be done with this extra flexibility in the export backend.
It consists of a new admin report which allows admins to export activity grades for more than one course at a time. This was developed for corporate clients who need this functionality since the same instructors teach a lot of different courses and found it very painful to go through a series of courses to do grade exports.