[LON-CAPA-cvs] cvs: modules /gerd extract.pl

www lon-capa-cvs@mail.lon-capa.org
Thu, 22 Apr 2004 15:52:49 -0000


www		Thu Apr 22 11:52:49 2004 EDT

  Modified files:              
    /modules/gerd	extract.pl 
  Log:
  Fixing bug #2073?
  
  
Index: modules/gerd/extract.pl
diff -u modules/gerd/extract.pl:1.2 modules/gerd/extract.pl:1.3
--- modules/gerd/extract.pl:1.2	Thu Jul 24 17:26:20 2003
+++ modules/gerd/extract.pl	Thu Apr 22 11:52:49 2004
@@ -4,7 +4,7 @@
 #
 # Extract datafiles, make anonymous
 #
-# $Id: extract.pl,v 1.2 2003/07/24 21:26:20 www Exp $
+# $Id: extract.pl,v 1.3 2004/04/22 15:52:49 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -63,13 +63,14 @@
             $res=&unescape($res);
             $res=~s/^\/res\///;
             $res=~s/^\///;
-            $res=~/([^\_]+)$/;
-            if ($urlkey{$1}) { 
-               $res=$urlkey{$1}; 
+            $urlres=(split(/\_\_\_/,$res))[-1];
+#	    print "\nFound: ".$res." ".$urlres;
+            if ($urlkey{$urlres}) { 
+               $res=$urlkey{$urlres}; 
 	    } elsif ($res!~/^adm\//) {
 		$othernum++;
-                &makeres('NONSEQ_'.$othernum,$1);
-                $res=$urlkey{$1};
+                &makeres('NONSEQ_'.$othernum,$urlres);
+                $res=$urlkey{$urlres};
 	    }
             $key=$mykey{$uname};
             my $judge='';