Permalink
Browse files

MDL-34795 completion: Add course_completed event

  • Loading branch information...
1 parent e6aac11 commit 25e107e5a2432b30b34b866df7f9fca4449eb93d Aaron Barnes committed Aug 13, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/completion/completion_completion.php
@@ -165,7 +165,11 @@ public function mark_complete($timecomplete = null) {
$this->timecompleted = $timecomplete;
// Save record
- return $this->_save();
+ if ($result = $this->_save()) {
+ events_trigger('course_completed', $this->get_record_data());
+ }
+
+ return $result;
}
/**

0 comments on commit 25e107e

Please sign in to comment.