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

sakharuk lon-capa-cvs@mail.lon-capa.org
Thu, 11 Jul 2002 20:06:37 -0000


sakharuk		Thu Jul 11 16:06:37 2002 EDT

  Modified files:              
    /loncom/interface	printout.pl 
  Log:
  Added cleanup (remove) temporary file with due dates.
  
  
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.8 loncom/interface/printout.pl:1.9
--- loncom/interface/printout.pl:1.8	Thu May 23 16:20:17 2002
+++ loncom/interface/printout.pl	Thu Jul 11 16:06:37 2002
@@ -7,7 +7,8 @@
 my ($texfile,$laystyle) = split(/&/,$ENV{'QUERY_STRING'});
 my $figfile = $texfile;
 $figfile =~ s/^([^\.]+printout)[^t]+\.tex/$1\.dat/;
-print "GLYDI SUDY $figfile ENS";
+my $duefile = $figfile;
+$duefile =~ s/\.dat$/\.due/;
 if (-e $figfile) {
     my $temporary_file=IO::File->new($figfile) || die "Couldn't open file for reading: $!\n";
     my @content_of_file = <$temporary_file>;
@@ -65,7 +66,7 @@
 $texps =~ s/\.tex/\.ps/;
 my @garb = ($texlog,$texaux,$texdvi,$texps);
 unlink @garb;
-
+unlink $duefile;
 
 print "<a href=\"/prtspool/$name_file\">Your PDF document</a>\n";
 print "\n";