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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 21 May 2002 00:44:03 -0000


albertel		Mon May 20 20:44:03 2002 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  - the file name should change everytime, otherwise we browsers start cachign the pdf file
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.29 loncom/interface/lonprintout.pm:1.30
--- loncom/interface/lonprintout.pm:1.29	Mon May 20 15:05:39 2002
+++ loncom/interface/lonprintout.pm	Mon May 20 20:44:03 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.29 2002/05/20 19:05:39 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.30 2002/05/21 00:44:03 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -272,7 +272,7 @@
     $result =~ s/\b_+\b/\\makebox\[1 cm\]\[b\]{\\hrulefill}/g;
 #-- writing .tex file in prtspool 
     my $temp_file;
-    $filename = "/home/httpd/prtspool/$ENV{'user.name'}$ENV{'user.domain'}temp$ENV{'user.login.time'}.tex";
+    $filename = "/home/httpd/prtspool/$ENV{'user.name'}_$ENV{'user.domain'}_printout_".time."_".rand(10000000).".tex";
     unless ($temp_file = Apache::File->new('>'.$filename)) {
 	$r->log_error("Couldn't open $filename for output $!");
 	return SERVER_ERROR;