--- loncom/interface/printout.pl 2004/02/11 00:19:49 1.46 +++ 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.46 2004/02/11 00:19:49 albertel Exp $ +# $Id: printout.pl,v 1.47 2004/02/13 21:17:50 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -32,6 +32,8 @@ 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()) { @@ -62,6 +64,7 @@ END my $back_ref = $ENV{'cgi.'.$identifier.'backref'}; my $number_of_files = $ENV{'cgi.'.$identifier.'numberoffiles'}+1; my $student_names = $ENV{'cgi.'.$identifier.'studentnames'}; + my $backref = $ENV{'cgi.'.$identifier.'backref'}; my @names_pack=(); if ($student_names=~/_END_/) { @@ -81,11 +84,11 @@ END my @content_of_file = <$temporary_file>; 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; @@ -122,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); @@ -134,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++; @@ -150,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; @@ -338,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);