Navigation Menu

Skip to content

Commit

Permalink
MDL-34795 completion: Add course_completed event
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Barnes committed Aug 10, 2012
1 parent 87e9331 commit 66b23db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion completion/completion_completion.php
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 66b23db

Please sign in to comment.