]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed bug in setting optionalDefaults outside the main loop
authorfiedorow <fiedorow>
Tue, 6 Jan 2004 20:25:12 +0000 (20:25 +0000)
committerfiedorow <fiedorow>
Tue, 6 Jan 2004 20:25:12 +0000 (20:25 +0000)
admin/uploaduser.php

index dad874044bea276723767036c6e4b0f20e0ca829..1b2db12db858bab6715d9844fc4905a475c474d2 100755 (executable)
         }
         $linenum = 2; // since header is line 1
 
-        foreach ($optionalDefaults as $key => $value) {
-          $user->$key = $adminuser->$key;
-        }
         while (!feof ($fp)) {
-            //Note: commas within a field should be encoded as &#44
+            foreach ($optionalDefaults as $key => $value) {
+                $user->$key = $adminuser->$key;
+            }
+           //Note: commas within a field should be encoded as &#44
             $line = split("\,", fgets($fp,1024));
             foreach ($line as $key => $value) {
                 //decode encoded commas