Revert "Merge branch 'MDL-43127-master-fixup' of https://github.com/FMCorz/moodle"
authorDan Poltawski <dan@moodle.com>
Thu, 27 Nov 2014 09:33:48 +0000 (09:33 +0000)
committerDan Poltawski <dan@moodle.com>
Thu, 27 Nov 2014 09:33:48 +0000 (09:33 +0000)
This reverts commit 7bd780835b2e9ff8002da218a5ca42de8dc321b4, reversing
changes made to 1e7e4d5f01c7eaa2278aa38f8abd8c04197d51cc.

admin/tool/uploadcourse/classes/helper.php
admin/tool/uploadcourse/tests/helper_test.php

index 5ffc677..0a3e12e 100644 (file)
@@ -164,10 +164,7 @@ class tool_uploadcourse_helper {
         if (!empty($enrolmethods)) {
             $enrolmentplugins = self::get_enrolment_plugins();
             foreach ($enrolmethods as $key => $method) {
-                if (empty($method)) {
-                    // The enrolment method is not specified, we skip it.
-                    continue;
-                } else if (!array_key_exists($method, $enrolmentplugins)) {
+                if (!array_key_exists($method, $enrolmentplugins)) {
                     // Unknown enrolment method.
                     $unknownmethods[] = $method;
                     continue;
index b10cdaf..22569e3 100644 (file)
@@ -79,7 +79,6 @@ 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(