--- loncom/interface/printout.pl 2004/02/06 14:16:39 1.45 +++ loncom/interface/printout.pl 2004/02/13 21:17:50 1.47 @@ -1,7 +1,7 @@ #!/usr/bin/perl # CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc. # -# $Id: printout.pl,v 1.45 2004/02/06 14:16:39 sakharuk Exp $ +# $Id: printout.pl,v 1.47 2004/02/13 21:17:50 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -32,7 +32,10 @@ use LONCAPA::loncgi(); use File::Path; use IO::File; use Image::Magick; +use Apache::lonhtmlcommon; + +my %origENV=%ENV; if (! &LONCAPA::loncgi::check_cookie_and_load_env()) { print <; close $temporary_file; my $noteps; - &Create_StatWin ('Starting eps pictures creation', 'Pictires Status window'); + my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin('','Pictures CreationPrint Status','Pictires Status window',$#content_of_file); foreach $not_eps (@content_of_file) { if ($not_eps ne '') { my $status_statement='EPS picture for '.$not_eps; - &Update_StaWin ($status_statement); + &Apache::lonhtmlcommon::Update_PrgWin('',\%prog_state,'last PDF file '.$not_eps); $not_eps=~s|\/\.\/|\/|g; my $eps_f = $not_eps; $eps_f =~ s/\.[^.]*$/\.eps/i; @@ -119,7 +125,7 @@ END } } } - &Close_StatWin(); + &Apache::lonhtmlcommon::Close_PrgWin('',\%prog_state); } #print "$texfile\n"; #name of the tex file for debugging only my @texfile=($texfile); @@ -131,9 +137,9 @@ END } } my $ind=-1; -&Create_StatWin ('Starting PDF production for students', 'PDF Status window'); +my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin('','Print Status','Class Print Status',$number_of_files); foreach $texfile (@texfile) { - my $final_statement="Link to your PDF document: "; + my $final_statement="Back to where you started

Link to your PDF document: "; my $status_statement='PDF document for '; if ($number_of_files>1) { $ind++; @@ -147,7 +153,7 @@ foreach $texfile (@texfile) { $status_statement.=' - '.$tempo_array[3]; } } -&Update_StaWin ($status_statement); +&Apache::lonhtmlcommon::Update_PrgWin('',\%prog_state,'last PDF file '.$status_statement); if (-e $texfile) { $texfile =~ m/^(.*)\/([^\/]+)$/; my $name_file = $2; @@ -335,34 +341,7 @@ if ($number_of_files>1) { $zipfile=~s/\/home\/httpd//; print "
Your ZIP file is here"; } -&Close_StatWin(); - - -sub Create_StatWin { - my ($title, $heading)=@_; - print('"); -} - -sub Update_StaWin { - my ($info)=@_; - print(''); -} - -sub Close_StatWin { - print(''."\n"); - -} +&Apache::lonhtmlcommon::Close_PrgWin('',\%prog_state);