MDL-45445 events: added missing 'other' validation

This commit is contained in:
Mark Nelson
2014-06-12 20:47:20 -07:00
parent 655cdde2dc
commit be7809f5fd
17 changed files with 186 additions and 0 deletions
+14
View File
@@ -100,4 +100,18 @@ class course_deleted extends base {
protected function get_legacy_logdata() {
return array(SITEID, 'course', 'delete', 'view.php?id=' . $this->objectid, $this->other['fullname'] . '(ID ' . $this->objectid . ')');
}
/**
* Custom validation.
*
* @throws \coding_exception
* @return void
*/
protected function validate_data() {
parent::validate_data();
if (!isset($this->other['fullname'])) {
throw new \coding_exception('The \'fullname\' value must be set in other.');
}
}
}