Thursday, February 25, 2016

The trigger I created is not in the moodle db

I was thinking about my trigger this am, the one I created in my moodle system to automatically copy new enrollments into a copy of the synced enrollments DB called perpetuity.   this is my solution for keeping enrollments for completed and dropped students in our accelerateU on line service.  We offer courses to New York State public high school students.  We have to keep records around for a while.  But, I digress.

Entering back into this solution confused me.  I spent about 30 minutes looking for the trigger I knew I had created.  I looked in the moodle DB first, in both mdl_user_enrolments and mdl_enrol tables.  I am using moodle 2.6.11.  I used the MYSQL show triggers command on the DB, but did not find the trigger in the DB.

Finally, I realized my mistake and looked at the other DB involved in our enrollment process, and found the trigger there.  show triggers did the trick.

Moral of the story?  This moodle instance has an external enrollment configuration and its own enrollments table where I created the trigger, on the insert record event.











No comments:

Post a Comment