To get this worked out properly you would need to make use of SecurityAssist, eCart, and Universal Email.
The idea is that you have a user add the courses to their cart and checkout or just checkout directly after selecting a course. When the order has been confirmed and returned as successful you would then generate the password value for the user to be able to login to the course.
After the value has been generated you will store this information in the details of the order for that user. You would then use Universal Email to send an email receipt to the user with this code for the course and a link to the course page. The user would then login with their email address and the password provided in the email. Security Assist would ensure that details match what is in the db to allow the user access.
This is all just a high level overview of how I imagine it could be worked out. Please post back with any questions that you have about any part of this and I will be glad to help you get going on it.