by Andrew Normore.
I've spent a GREAT deal of time on creating this, unfortuantley I cannot share the code.
I started by replicated the extra profile fields functionality, and converting it to work by attaching to courses. It'll take you a solid week, but is a GREAT experience if you're new to Moodle. Expect to spend 15-20 hours on it, but yes, it can totally be done.