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

foxr lon-capa-cvs@mail.lon-capa.org
Tue, 20 Jun 2006 09:39:48 -0000


foxr		Tue Jun 20 05:39:48 2006 EDT

  Modified files:              
    /loncom/interface	printout.pl 
  Log:
  Add progress window info for repagniation.. in case it gets to be 
  time consuming.
  
  
  
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.103 loncom/interface/printout.pl:1.104
--- loncom/interface/printout.pl:1.103	Mon Jun 19 18:30:15 2006
+++ loncom/interface/printout.pl	Tue Jun 20 05:39:47 2006
@@ -234,7 +234,8 @@
 		  my $prettyname=$not_eps;
 		  $prettyname=~s|/home/([^/]+)/public_html|/priv/$1|;
 		  $prettyname=~s|$Apache::lonnet::perlvar{'lonDocRoot'}/|/|;
-		  &Apache::lonhtmlcommon::Update_PrgWin('',\%prog_state,'Converting to EPS '.$prettyname);
+		  &Apache::lonhtmlcommon::Update_PrgWin('',\%prog_state,
+							'Converting to EPS '.$prettyname);
 	      }
 	      $done_conversion{$not_eps}=1;
 	      # print "Converting $not_eps -> $eps_f"; # Debugging
@@ -728,6 +729,9 @@
     my @pages_in_student;	# For each student his/her initial page count.
     my $max_pages = 0;		# Pages in 'longest' student.
     my $page_number = 0;
+    &Apache::lonhtmlcommon::Update_PrgWin('',\%prog_state, 
+					  "Counting pages for student: ".$student_number+1);
+
     while ($line = <PSFILE>) {
 	
 	# Check for total pages (%%Pages:)
@@ -756,7 +760,9 @@
 	if ($line =~ /ENDOFSTUDENTSTAMP/) {
 	    $pages_in_student[$student_number] = $page_number;
 	    $student_number++;
-
+	    &Apache::lonhtmlcommon::Update_PrgWin('',\%prog_state, 
+						  "Counting pages for student: ".$student_number+1);
+	    
 	    if ($page_number > $max_pages) {
 		$max_pages = $page_number;
 	    }
@@ -789,6 +795,8 @@
 
 
     $student_number = 0;	# first student...
+    &Apache::lonhtmlcommon::Update_PrgWin('',\%prog_state, 
+					  "Repaginating student ".$student_number+1);
 
     while (my $line = <LATEXIN>) {
 	if ($line eq "\\special{ps:ENDOFSTUDENTSTAMP}\n") {
@@ -805,6 +813,8 @@
 	    }
 	    
 	    $student_number++;
+	    &Apache::lonhtmlcommon::Update_PrgWin('',\%prog_state, 
+						  "Repaginating student ".$student_number+1);
 	    
 	} else {
 	    print LATEXOUT $line;