[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm

foxr lon-capa-cvs@mail.lon-capa.org
Tue, 08 Mar 2005 23:29:11 -0000


foxr		Tue Mar  8 18:29:11 2005 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
    Remove any image conversion queue file for the user/domain prior to 
  generating the LaTeX as it can only be there as a result of a failure
  and may contain bad image names (at least until I can fix the
  issue of not being able to print construction space relative image
  specs).  This at least allows a print that followed to work if it used 
  to work.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.366 loncom/interface/lonprintout.pm:1.367
--- loncom/interface/lonprintout.pm:1.366	Wed Feb 23 06:51:40 2005
+++ loncom/interface/lonprintout.pm	Tue Mar  8 18:29:11 2005
@@ -1,7 +1,7 @@
 #  The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.366 2005/02/23 11:51:40 foxr Exp $
+# $Id: lonprintout.pm,v 1.367 2005/03/08 23:29:11 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1340,6 +1340,7 @@
 	$result =~ s/\\evensidemargin\s*=\s*-?\d*\.?\d*\s*(cm|mm|in)/\\evensidemargin= $helper->{'VARS'}->{'pagesize.lmargin'} $helper->{'VARS'}->{'pagesize.lmarginunit'} /;
 	$result =~ s/\\oddsidemargin\s*=\s*-?\d*\.?\d*\s*(cm|mm|in)/\\oddsidemargin= $helper->{'VARS'}->{'pagesize.lmargin'} $helper->{'VARS'}->{'pagesize.lmarginunit'} /;
     }
+
 #-- writing .tex file in prtspool 
     my $temp_file;
     my $identifier = &Apache::loncommon::get_cgi_id();
@@ -1584,7 +1585,14 @@
 #
 
 
-			 
+    #  If a figure conversion queue file exists for this user.domain
+    # we delete it since it can only be bad (if it were good, printout.pl
+    # would have deleted it the last time around.
+
+    my $conversion_queuefile = "/home/httpd/prtspool/$ENV{'user.name'}_$ENV{'user.domain'}_printout.dat";
+    if(-e $conversion_queuefile) {
+	unlink $conversion_queuefile;
+    }
     &output_data($r,$helper,\%parmhash);
     return OK;
 }