mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
Merge branch 'MDL-43127-master-fixup' of https://github.com/FMCorz/moodle
This commit is contained in:
commit
7bd780835b
@ -164,7 +164,10 @@ class tool_uploadcourse_helper {
|
||||
if (!empty($enrolmethods)) {
|
||||
$enrolmentplugins = self::get_enrolment_plugins();
|
||||
foreach ($enrolmethods as $key => $method) {
|
||||
if (!array_key_exists($method, $enrolmentplugins)) {
|
||||
if (empty($method)) {
|
||||
// The enrolment method is not specified, we skip it.
|
||||
continue;
|
||||
} else if (!array_key_exists($method, $enrolmentplugins)) {
|
||||
// Unknown enrolment method.
|
||||
$unknownmethods[] = $method;
|
||||
continue;
|
||||
|
@ -79,6 +79,7 @@ class tool_uploadcourse_helper_testcase extends advanced_testcase {
|
||||
'enrolment_5_test2' => 'test2',
|
||||
'enrolment_5_test1' => 'test1',
|
||||
'enrolment_5' => 'flatfile',
|
||||
'enrolment_6' => '',
|
||||
);
|
||||
$expected = array(
|
||||
'self' => array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user