Hey Scott,
I'm new to Rails myself, but hope I can help in some way...
Perhaps a simplification to your model might help. Would it possible to consider it this way instead:
A person may attend many classes. Additionally, a class may be attended by many people. When a person attends a class, they are associated a role.
This simplification prohibits a person from having more than one role for a particular class. For example, Alan can attend Chemistry as a student and English as a teacher. But Alan could not attend Chemistry as a student AND a teacher.
Let me know if this simplification seems viable; if so, I'll see if I can help you build your models
Hope this helps.
Cheers, Louis.