MDL-39956 cohort: Event clean up and made ready for integration

* Added more PHP Documentation
* Localised strings for get_name()
* get_legacy_eventname() is now static
* get_legacy_eventdata() is now protected
* Testing legacy event data
* Added missing defined('MOODLE_INTERNAL') checks
* Added missing call to add_record_snapshot()
This commit is contained in:
Frederic Massart 2013-08-13 17:26:35 +08:00
parent 4fece33d9a
commit 25a66af722
8 changed files with 160 additions and 75 deletions

View file

@ -85,6 +85,7 @@ function cohort_update_cohort($cohort) {
'context' => context::instance_by_id($cohort->contextid),
'objectid' => $cohort->id,
));
$event->add_record_snapshot('cohort', $cohort);
$event->trigger();
}