fixed missing exception

This commit is contained in:
Petr Skoda 2010-09-17 12:31:19 +00:00
parent 68573df5e1
commit c05260de32

View File

@ -548,7 +548,7 @@ class course_enrolment_manager {
require_capability('moodle/role:assign', $this->context);
if (!array_key_exists($roleid, $this->get_assignable_roles())) {
if (is_defined('AJAX_SCRIPT')) {
throw new moodle_;
throw new moodle_exception('invalidrole');
}
return false;
}