--- /tmp/completion_completion.php 2012-08-14 09:11:53.000000000 -0500 +++ lib/completion/completion_completion.php 2012-08-14 09:11:22.000000000 -0500 @@ -205,7 +205,10 @@ class completion_completion extends data $this->timecompleted = $timecomplete; // Save record - $this->_save(); + if ($result = $this->_save()) { + events_trigger('course_completed', $this->get_record_data()); + } + return $result; } /** @@ -224,7 +227,7 @@ class completion_completion extends data // Save record if ($this->id) { - $this->update(); + return $this->update(); } else { // Make sure reaggregate field is not null if (!$this->reaggregate) { @@ -236,7 +239,7 @@ class completion_completion extends data $this->timestarted = 0; } - $this->insert(); + return $this->insert(); } } }