]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed Bug #5071 - The script uploaduser.php ignores the rest of records after
authorvyshane <vyshane>
Mon, 10 Apr 2006 04:54:34 +0000 (04:54 +0000)
committervyshane <vyshane>
Mon, 10 Apr 2006 04:54:34 +0000 (04:54 +0000)
the first one

admin/uploaduser.php

index e28f7f6bfb457211b959c4435bac7be1d45a0334..ffc456cc9904d7d5a9a5caf08d3726fe910f146d 100755 (executable)
@@ -322,11 +322,13 @@ if ($um->preprocess_files() && confirm_sesskey()) {
                                         $ret = enrol_student($user->id, $course[$i]->id);
                                         break;
                                 }
-                                if ($ret) {   // OK
-                                    notify('-->'. get_string('enrolledincourse', '', $addcourse[$i]));
-                                } else {
-                                    notify('-->'.get_string('enrolledincoursenot', '', $addcourse[$i]));
-                                }
+                            } else {
+                                $ret = enrol_student($user->id, $course[$i]->id);
+                            }
+                            if ($ret) {   // OK
+                                notify('-->'. get_string('enrolledincourse', '', $addcourse[$i]));
+                            } else {
+                                notify('-->'.get_string('enrolledincoursenot', '', $addcourse[$i]));
                             }
                         }
                     }