--- loncom/automation/Autocreate.pl	2007/07/02 03:36:47	1.6
+++ loncom/automation/Autocreate.pl	2008/02/07 04:39:42	1.8
@@ -101,10 +101,18 @@
 
     print $fh "Sending to batch - auto,$defdom,$dcname,$dcdom ".join(":",@requests)."\n";
     my ($result,$logmsg) = &LONCAPA::batchcreatecourse::create_courses(\@requests,\%courseids,'auto',$defdom,$dcname,$dcdom);
-    print $fh "$result && $logmsg\n";
+    my $outcome;
+    if ($result ne '') {
+        $outcome = $result."\n";
+    }
+    if ($logmsg ne '') {
+        $outcome .= $logmsg."\n";    
+    }
+    print $fh $outcome;
 
+    my $output;
 # Copy requests from pending directory to processed directory and unlink.
-  foreach my $request (@requests) {  
+    foreach my $request (@requests) {  
         if ((-e "$batchdir/pending/$request") && $request !~ /\.\./ && $request ne '' &&$request ne './') {
             open(FILE,"<$batchdir/pending/$request");
             my @buffer = <FILE>;
@@ -121,7 +129,6 @@
         }
     }
 
-    my $output;
     foreach my $key (sort keys %courseids) {
         print $fh "created course: $key - $courseids{$key}\n";
         my $newcourse = &Apache::lonnet::escape($key.':'.$courseids{$key});