[LON-CAPA-cvs] cvs: loncom /interface printout.pl

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 29 Jul 2004 19:45:42 -0000


albertel		Thu Jul 29 15:45:42 2004 EDT

  Modified files:              
    /loncom/interface	printout.pl 
  Log:
  - diasble progress windows for students
  
  
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.59 loncom/interface/printout.pl:1.60
--- loncom/interface/printout.pl:1.59	Wed Jul 28 18:00:14 2004
+++ loncom/interface/printout.pl	Thu Jul 29 15:45:41 2004
@@ -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.60 2004/07/29 19:45:41 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -403,7 +403,9 @@
     $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 @@
 	    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);