Diff for /loncom/interface/printout.pl between versions 1.59 and 1.61

version 1.59, 2004/07/28 22:00:14 version 1.61, 2004/08/03 21:18:53
Line 154  END Line 154  END
   
 my $ind=-1;  my $ind=-1;
 my %prog_state;  my %prog_state;
   print "<a href=\"$backref\"><b>Return</b></a> to last resource.<br /><br />";
 if ($adv) { %prog_state=&Apache::lonhtmlcommon::Create_PrgWin('','Print Status','Class Print Status',$number_of_files,'inline','80'); }  if ($adv) { %prog_state=&Apache::lonhtmlcommon::Create_PrgWin('','Print Status','Class Print Status',$number_of_files,'inline','80'); }
 my $final_statement="<a href=\"$backref\"><b>Return</b></a> to last resource.<br /><br />Generated PDF File for:<br />";  print "<br />";
 foreach $texfile (@texfile) {  foreach $texfile (@texfile) {
   my $status_statement='';    my $status_statement='';
   my $link_text='download PDF';    my $link_text='download PDF';
Line 168  foreach $texfile (@texfile) { Line 169  foreach $texfile (@texfile) {
   } else {    } else {
       $name=$tempo_array[0].'@'.$tempo_array[1];        $name=$tempo_array[0].'@'.$tempo_array[1];
   }    }
   $link_text='<b>'.$name.'</b> ';    $link_text='<b>'.$name.'</b>';
   $status_statement.=$name;    $status_statement.=$name;
   if ($#stud_info>0) {    if ($#stud_info>0) {
       @tempo_array=split(/:/,$stud_info[-1]);        @tempo_array=split(/:/,$stud_info[-1]);
Line 177  foreach $texfile (@texfile) { Line 178  foreach $texfile (@texfile) {
       } else {        } else {
   $name=$tempo_array[0].'@'.$tempo_array[1];    $name=$tempo_array[0].'@'.$tempo_array[1];
       }        }
       $link_text.='- <b>'.$name.':</b>  ';        $link_text.=' - <b>'.$name.'</b>';
       $status_statement.=' -  '.$name;        $status_statement.=' -  '.$name;
   }     } 
   if ($adv) { &Apache::lonhtmlcommon::Update_PrgWin('',\%prog_state,'Creating PDF for '.$status_statement); }    if ($adv) { &Apache::lonhtmlcommon::Update_PrgWin('',\%prog_state,'Creating PDF for '.$status_statement); }
Line 334  foreach $texfile (@texfile) { Line 335  foreach $texfile (@texfile) {
      "for $status_statement now Converting to PS",       "for $status_statement now Converting to PS",
      \%prog_state,$new_name_file);       \%prog_state,$new_name_file);
   if (-e $new_name_file) {    if (-e $new_name_file) {
       print "<br />$final_statement ";        print "<br />";
       $final_statement='';  
       $new_name_file =~ m/^(.*)\./;        $new_name_file =~ m/^(.*)\./;
       my $ps_file = my $tempo_file = $1.'temporar.ps';        my $ps_file = my $tempo_file = $1.'temporar.ps';
       my $pdf_file = $1.'.pdf';        my $pdf_file = $1.'.pdf';
Line 403  sub busy_wait_command { Line 403  sub busy_wait_command {
     $SIG{CHLD} = \&REAPER;      $SIG{CHLD} = \&REAPER;
     $done=0;      $done=0;
     my $pid=open(CMD,"$command |");      my $pid=open(CMD,"$command |");
     &Apache::lonhtmlcommon::Update_PrgWin('',$progress_win,$message);      if ($adv) {
    &Apache::lonhtmlcommon::Update_PrgWin('',$progress_win,$message);
       }
     while(!$done) {      while(!$done) {
  sleep 1;   sleep 1;
  my $extra_msg;   my $extra_msg;
Line 411  sub busy_wait_command { Line 413  sub busy_wait_command {
     my $size=(stat($output_file))[7];      my $size=(stat($output_file))[7];
     $extra_msg=", $size bytes generated";      $extra_msg=", $size bytes generated";
  }   }
  &Apache::lonhtmlcommon::Update_PrgWin('',$progress_win,   if ($adv) {
       $message.$extra_msg);      &Apache::lonhtmlcommon::Update_PrgWin('',$progress_win,
     $message.$extra_msg);
    }
     }      }
     $SIG{CHLD}='IGNORE';      $SIG{CHLD}='IGNORE';
     close(CMD);      close(CMD);

Removed from v.1.59  
changed lines
  Added in v.1.61


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>