--- loncom/interface/printout.pl 2004/07/28 22:00:14 1.59
+++ loncom/interface/printout.pl 2004/09/09 20:41:04 1.61.2.1
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc.
#
-# $Id: printout.pl,v 1.59 2004/07/28 22:00:14 albertel Exp $
+# $Id: printout.pl,v 1.61.2.1 2004/09/09 20:41:04 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -154,8 +154,9 @@ END
my $ind=-1;
my %prog_state;
+print "Return to last resource.
";
if ($adv) { %prog_state=&Apache::lonhtmlcommon::Create_PrgWin('','Print Status','Class Print Status',$number_of_files,'inline','80'); }
-my $final_statement="Return to last resource.
Generated PDF File for:
";
+print "
";
foreach $texfile (@texfile) {
my $status_statement='';
my $link_text='download PDF';
@@ -168,7 +169,7 @@ foreach $texfile (@texfile) {
} else {
$name=$tempo_array[0].'@'.$tempo_array[1];
}
- $link_text=''.$name.' ';
+ $link_text=''.$name.'';
$status_statement.=$name;
if ($#stud_info>0) {
@tempo_array=split(/:/,$stud_info[-1]);
@@ -177,7 +178,7 @@ foreach $texfile (@texfile) {
} else {
$name=$tempo_array[0].'@'.$tempo_array[1];
}
- $link_text.='- '.$name.': ';
+ $link_text.=' - '.$name.'';
$status_statement.=' - '.$name;
}
if ($adv) { &Apache::lonhtmlcommon::Update_PrgWin('',\%prog_state,'Creating PDF for '.$status_statement); }
@@ -334,8 +335,7 @@ foreach $texfile (@texfile) {
"for $status_statement now Converting to PS",
\%prog_state,$new_name_file);
if (-e $new_name_file) {
- print "
$final_statement ";
- $final_statement='';
+ print "
";
$new_name_file =~ m/^(.*)\./;
my $ps_file = my $tempo_file = $1.'temporar.ps';
my $pdf_file = $1.'.pdf';
@@ -367,7 +367,7 @@ foreach $texfile (@texfile) {
my @garb = ($texlog,$texaux,$texdvi,$texps);
# unlink @garb;
unlink $duefile;
- print "$link_text";
+ print "$link_text - click here to download pdf";
print "\n";
}
}
@@ -403,7 +403,9 @@ sub busy_wait_command {
$SIG{CHLD} = \&REAPER;
$done=0;
my $pid=open(CMD,"$command |");
- &Apache::lonhtmlcommon::Update_PrgWin('',$progress_win,$message);
+ if ($adv) {
+ &Apache::lonhtmlcommon::Update_PrgWin('',$progress_win,$message);
+ }
while(!$done) {
sleep 1;
my $extra_msg;
@@ -411,8 +413,10 @@ sub busy_wait_command {
my $size=(stat($output_file))[7];
$extra_msg=", $size bytes generated";
}
- &Apache::lonhtmlcommon::Update_PrgWin('',$progress_win,
- $message.$extra_msg);
+ if ($adv) {
+ &Apache::lonhtmlcommon::Update_PrgWin('',$progress_win,
+ $message.$extra_msg);
+ }
}
$SIG{CHLD}='IGNORE';
close(CMD);