MDL-40055 mod_assign: Wrong namespace when throwing exception
This commit is contained in:
@@ -102,12 +102,12 @@ class extension_granted extends \core\event\base {
|
||||
/**
|
||||
* Custom validation.
|
||||
*
|
||||
* @throws coding_exception
|
||||
* @throws \coding_exception
|
||||
* @return void
|
||||
*/
|
||||
protected function validate_data() {
|
||||
if (!isset($this->relateduserid)) {
|
||||
throw new coding_exception('relateduserid is a mandatory property.');
|
||||
throw new \coding_exception('relateduserid is a mandatory property.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,14 +102,14 @@ class marker_updated extends \core\event\base {
|
||||
/**
|
||||
* Custom validation.
|
||||
*
|
||||
* @throws coding_exception
|
||||
* @throws \coding_exception
|
||||
* @return void
|
||||
*/
|
||||
protected function validate_data() {
|
||||
if (!isset($this->other['markerid'])) {
|
||||
throw new coding_exception('markerid must be set in $other.');
|
||||
throw new \coding_exception('markerid must be set in $other.');
|
||||
} else if (!isset($this->relateduserid)) {
|
||||
throw new coding_exception('relateduserid must be set.');
|
||||
throw new \coding_exception('relateduserid must be set.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,12 +102,12 @@ class submission_graded extends \core\event\base {
|
||||
/**
|
||||
* Custom validation.
|
||||
*
|
||||
* @throws coding_exception
|
||||
* @throws \coding_exception
|
||||
* @return void
|
||||
*/
|
||||
protected function validate_data() {
|
||||
if (!isset($this->relateduserid)) {
|
||||
throw new coding_exception('relateduserid is a mandatory property.');
|
||||
throw new \coding_exception('relateduserid is a mandatory property.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,12 +102,12 @@ class submission_locked extends \core\event\base {
|
||||
/**
|
||||
* Custom validation.
|
||||
*
|
||||
* @throws coding_exception
|
||||
* @throws \coding_exception
|
||||
* @return void
|
||||
*/
|
||||
protected function validate_data() {
|
||||
if (!isset($this->relateduserid)) {
|
||||
throw new coding_exception('relateduserid is a mandatory property.');
|
||||
throw new \coding_exception('relateduserid is a mandatory property.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,12 +102,12 @@ class submission_status_updated extends \core\event\base {
|
||||
/**
|
||||
* Custom validation.
|
||||
*
|
||||
* @throws coding_exception
|
||||
* @throws \coding_exception
|
||||
* @return void
|
||||
*/
|
||||
protected function validate_data() {
|
||||
if (!isset($this->other['newstatus'])) {
|
||||
throw new coding_exception('newstatus must be set in $other.');
|
||||
throw new \coding_exception('newstatus must be set in $other.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,12 +102,12 @@ class submission_unlocked extends \core\event\base {
|
||||
/**
|
||||
* Custom validation.
|
||||
*
|
||||
* @throws coding_exception
|
||||
* @throws \coding_exception
|
||||
* @return void
|
||||
*/
|
||||
protected function validate_data() {
|
||||
if (!isset($this->relateduserid)) {
|
||||
throw new coding_exception('relateduserid is a mandatory property.');
|
||||
throw new \coding_exception('relateduserid is a mandatory property.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,14 +102,14 @@ class workflow_state_updated extends \core\event\base {
|
||||
/**
|
||||
* Custom validation.
|
||||
*
|
||||
* @throws coding_exception
|
||||
* @throws \coding_exception
|
||||
* @return void
|
||||
*/
|
||||
protected function validate_data() {
|
||||
if (!isset($this->other['newstate'])) {
|
||||
throw new coding_exception('newstate must be set in $other.');
|
||||
throw new \coding_exception('newstate must be set in $other.');
|
||||
} else if (!isset($this->relateduserid)) {
|
||||
throw new coding_exception('relateduserid must be set.');
|
||||
throw new \coding_exception('relateduserid must be set.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user