From 0bcf4732fa59c285f64aeb6773f8aea830db4f8f Mon Sep 17 00:00:00 2001 From: vyshane Date: Mon, 10 Apr 2006 04:54:34 +0000 Subject: [PATCH] Fixed Bug #5071 - The script uploaduser.php ignores the rest of records after the first one --- admin/uploaduser.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/admin/uploaduser.php b/admin/uploaduser.php index e28f7f6bfb4..ffc456cc990 100755 --- a/admin/uploaduser.php +++ b/admin/uploaduser.php @@ -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])); } } }