[LON-CAPA-cvs] cvs: loncom /interface printout.pl

www lon-capa-cvs-allow@mail.lon-capa.org
Tue, 11 Mar 2008 01:48:57 -0000


www		Mon Mar 10 21:48:57 2008 EDT

  Modified files:              
    /loncom/interface	printout.pl 
  Log:
  Bug #5643: not erroneously timing out during printouts
  
  
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.131 loncom/interface/printout.pl:1.132
--- loncom/interface/printout.pl:1.131	Mon Mar 10 18:42:28 2008
+++ loncom/interface/printout.pl	Mon Mar 10 21:48:57 2008
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 # CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc.
 #
-# $Id: printout.pl,v 1.131 2008/03/10 22:42:28 www Exp $
+# $Id: printout.pl,v 1.132 2008/03/11 01:48:57 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -43,7 +43,7 @@
 
 use strict;
 
-my $busy_wait_timeout = 300; 
+my $busy_wait_timeout = 30; 
 
 #   Determine if a user is operating as a student for this course/domain.
 #Parameters:
@@ -206,7 +206,7 @@
       close $temporary_file;  
       my $noteps;
       my %prog_state;
-      if ($advanced_role) { %prog_state=&Apache::lonhtmlcommon::Create_PrgWin('','Coverting Images to EPS','Picture Conversion Status',$#content_of_file,'inline','80');  }
+      if ($advanced_role) { %prog_state=&Apache::lonhtmlcommon::Create_PrgWin('','Converting Images to EPS','Picture Conversion Status',$#content_of_file,'inline','80');  }
       print('<br />');
       foreach my $not_eps (@content_of_file) {
 	  chomp($not_eps);
@@ -377,7 +377,7 @@
       my $name_file = $2;
       my $path_file = $1.'/';
       chdir $path_file;
-      my $dvi_file= $name_file; $dvi_file =~ s/\.tex/$name_range\.dvi/;
+      my $dvi_file= $name_file; $dvi_file =~ s/\.tex$/\.dvi/;
       &busy_wait_command("latex $name_file 1>/dev/null 2>/dev/null",
 			 "for $status_statement now LaTeXing file",
 			 \%prog_state,$dvi_file, $busy_wait_timeout);
@@ -449,7 +449,7 @@
               $logfilename=~s{^\Q$perlvar{'lonPrtDir'}\E}{/prtspool};
 	      print "<a href=\"$logfilename\">Your log file </a></big></b>";
 	      print "\n";
-              #link tooriginal LaTeX file (included according Michael Hamlin desire)
+              #link to original LaTeX file
 	      my $tex_temporary_file=IO::File->new($texfile) || die "Couldn't open tex file $texfile for reading: $!\n";
 	      my @tex_content_of_file = <$tex_temporary_file>;
 	      close $tex_temporary_file; 
@@ -620,7 +620,7 @@
               $logfilename=~s{^\Q$perlvar{'lonPrtDir'}\E}{/prtspool};
 	      print "<a href=\"$logfilename\">Your log file </a></big></b>";
 	      print "\n";
-	      #link tooriginal LaTeX file (included according Michael Hamlin desire)
+	      #link to original LaTeX file
 	      my $tex_temporary_file=IO::File->new($texfile) || die "Couldn't open tex file $texfile for reading: $!\n";
 	      my @tex_content_of_file = <$tex_temporary_file>;
 	      close $tex_temporary_file; 
@@ -824,7 +824,7 @@
 	    if ($size == $last_size) {
 		$unchanged_time++;
 		if ($timeout && ($unchanged_time > $timeout)) {
-		    print "<h1>Operation timed out!!!</h1>\n";
+		    print "<h1>Operation timed out!</h1>\n";
 		    print "<p>Executing $command, the output file $output_file did not grow\n";
 		    print "after $timeout seconds.  This <em>may</em> indicate $command\n";
 		    print "is in an infinite loop.\n";