MDL-40126 Enrolments: Implemented two webservices to get enrolment instance info

1. core_enrol_get_course_enrolment_methods() which returns all enrolment method instances
which implement get_enrol_info()
2. enrol_self_get_instance_info() will return information about self enrolment instance.
This commit is contained in:
Rajesh Taneja 2013-07-10 09:42:56 +08:00
parent bdd045c5ec
commit be9bf94e4a
8 changed files with 363 additions and 1 deletions

View file

@ -335,6 +335,10 @@ class enrol_self_plugin extends enrol_plugin {
$instanceinfo->requiredparam->enrolpassword = get_string('password', 'enrol_self');
}
// If enrolment is possible and password is required then return ws function name to get more information.
if ((true === $instanceinfo->status) && $instance->password) {
$instanceinfo->wsfunction = 'enrol_self_get_instance_info';
}
return $instanceinfo;
}