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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 22 Feb 2007 01:00:13 -0000


albertel		Wed Feb 21 20:00:13 2007 EDT

  Modified files:              
    /loncom/interface	printout.pl 
  Log:
  - fixing regexp to support usernames/domain with . and -
  
  
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.120 loncom/interface/printout.pl:1.121
--- loncom/interface/printout.pl:1.120	Fri Jan 19 15:22:33 2007
+++ loncom/interface/printout.pl	Wed Feb 21 20:00:13 2007
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 # CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc.
 #
-# $Id: printout.pl,v 1.120 2007/01/19 20:22:33 albertel Exp $
+# $Id: printout.pl,v 1.121 2007/02/22 01:00:13 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -188,9 +188,9 @@
 print "<a href=\"$backref\"><b>Return</b></a> to last resource.<br /><br />";
 
   my $figfile = $texfile;
-  $figfile =~ s/^([^\.]+printout)[^t]+\.tex/$1\.dat/;
+  $figfile =~ s/^(.*_printout)_\d+_\d+_\d+\.tex/$1\.dat/;
   my $duefile = $texfile;
-  $duefile =~ s/^([^\.]+printout)[^t]+\.tex/$1\.due/;
+  $duefile =~ s/^(.*_printout)_\d+_\d+_\d+\.tex/$1\.due/;
   #do we have figures?
   # print "Figure file: $figfile\n";
   if (-e $figfile) {