Thanks Richard!
Thats good news, it looks like I just create a "course completed" handler and register it by including it in mdl_events_handlers table:
INSERT INTO `moodle`.`mdl_events_handlers` (`id`, `eventname`, `component`, `handlerfile`, `handlerfunction`, `schedule`, `status`, `internal`) VALUES ('18', 'course_completed', 'mod_sp', '/mod/sp/lib.php', 'a:2:{i:0;s:18:\"enrol_meta_handler\";i:1;s:14:\"course_completed\";}', 'instant', '0', '1');
Then I just implement the lib.php handler and bob's your uncle!
Does this sound right.. anyone?