A couple of notes here. First, the firing of the event doesn't actually enroll the user in the course. The event is emitted iff the user is enrolled in the course. Second, I think we could be clearer here about who "his or her" refers to here, perhaps change to "each student"?