]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-8198 Modules whose names are substrings of other chosen modules are considered...
authorskodak <skodak>
Sun, 21 Jan 2007 10:33:28 +0000 (10:33 +0000)
committerskodak <skodak>
Sun, 21 Jan 2007 10:33:28 +0000 (10:33 +0000)
admin/enrol.php

index 3f6cfb2fdb61620e718836e68305d75fe5428ef7..b90ea29a01a6ce4d5c3b3321d2013a300a72d93b 100644 (file)
@@ -63,6 +63,7 @@
     $table->data = array();
 
     $modules = get_list_of_plugins("enrol");
+    $enabledplugins = explode(',', $CFG->enrol_plugins_enabled);
     foreach ($modules as $module) {
 
         // skip if directory is empty
@@ -73,7 +74,7 @@
         $name = get_string("enrolname", "enrol_$module");
         $plugin = enrolment_factory::factory($module);
         $enable = '<input type="checkbox" name="enable[]" value="'.$module.'"';
-        if (stristr($CFG->enrol_plugins_enabled, $module) !== false) {
+        if (in_array($module, $enabledplugins)) {
             $enable .= ' checked="checked"';
         }
         if ($module == 'manual') {