Permalink
Browse files

MDL-34795 completion: Add course_completed event

  • Loading branch information...
1 parent 87e9331 commit 66b23db417f5d8d52c3af9f2952ecbcd64f57a35 @srynot4sale srynot4sale committed Aug 10, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 completion/completion_completion.php
@@ -158,7 +158,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 66b23db

Please sign in to comment.