You need to look in mdl_logstore_standard_log. userid will be the teacher id and relateduserid will be the student.
General developer forum
Which teacher approved course completion
This discussion has been locked so you can no longer reply to it.