--- loncom/interface/printout.pl 2008/03/10 22:42:28 1.131 +++ loncom/interface/printout.pl 2008/03/11 01:48:57 1.132 @@ -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 LONCAPA::Configuration; 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 @@ $env{'request.noversionuri'} = '/cgi-bin 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('
'); foreach my $not_eps (@content_of_file) { chomp($not_eps); @@ -377,7 +377,7 @@ foreach $texfile (@texfile) { 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 @@ foreach $texfile (@texfile) { $logfilename=~s{^\Q$perlvar{'lonPrtDir'}\E}{/prtspool}; print "Your log file "; 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 @@ foreach $texfile (@texfile) { $logfilename=~s{^\Q$perlvar{'lonPrtDir'}\E}{/prtspool}; print "Your log file "; 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 @@ sub busy_wait_command { if ($size == $last_size) { $unchanged_time++; if ($timeout && ($unchanged_time > $timeout)) { - print "

Operation timed out!!!

\n"; + print "

Operation timed out!

\n"; print "

Executing $command, the output file $output_file did not grow\n"; print "after $timeout seconds. This may indicate $command\n"; print "is in an infinite loop.\n";