Prior to Moodle 1.9, Moodle did not have well-established grade import and export APIs. This made it much more difficult to write reusable and module grade passing integrations. Doing so generally involved directly accessing the database in order to pull grades from Moodle via a separate cron process. This is still a popular method, but with the new gradebook we also have a standardized approach using gradebook import and export plugins.
It is not well known, but Moodle 1.9 actually has built-in import and export plugins. Import and export plugins are included for both flat files and XML. The feature must first be enabled at the site-level and then individual courses can be set up to publish their grades to a URL or to import grades from a URL. Access is restricted via a secure key, but storage of the secure URLs need to be carefully managed to prevent their theft. These are enabled under Site Administration | Grades...