when a student is enrolled in a course

Note that instructors can batch enroll students without the student having to actually do anything.

If we're getting really technical I suppose that even when an instructor creates a new course they are automatically enrolled in the course, as are their TAs etc, so the subject doesn't actually even have to be a student necessarily. I'm not sure if this is worth noting or not...