Subsite: Students automatically joining membership when signing up for a course.

This is what I would like to do:
When someone buys a course through the subsite they register through coursepress. Then on the main site, membership does not allocate a membership level to that account so when a customer logs in, it just says "no membership level". I'm wondering if there is a way to automatically assign a membership level if someone registers through a coursepress subsite.