MDL-40055 mod_assign: Wrong namespace when throwing exception

This commit is contained in:
Frederic Massart
2013-08-26 14:21:34 +08:00
parent 959a328472
commit 725dfe6a54
7 changed files with 16 additions and 16 deletions
@@ -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.');
}
}
}
+3 -3
View File
@@ -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.');
}
}
}