mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
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:
parent
bdd045c5ec
commit
be9bf94e4a
8 changed files with 363 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue