refer to the eCart tutorial for adding Registration to the checkout pages and creating an order history page
this goes through storing the users ID in the orders table.
you would then have another table for uploads.
from the order history page, you could have a link that passes the course id to an upload page by a url variable. store the URL variable in a hidden form element.
when the file is uploaded, use the logged in user User Session to store the User ID and the hidden form element to store the course ID