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 13, 2012
1 parent e6aac11 commit 25e107e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/completion/completion_completion.php
Expand Up @@ -165,7 +165,11 @@ public function mark_complete($timecomplete = null) {
$this->timecompleted = $timecomplete; $this->timecompleted = $timecomplete;


// Save record // 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 25e107e

Please sign in to comment.