--- loncom/lonnet/perl/lonnet.pm	2002/04/26 18:49:09	1.209
+++ loncom/lonnet/perl/lonnet.pm	2002/05/05 01:59:42	1.210
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.209 2002/04/26 18:49:09 matthew Exp $
+# $Id: lonnet.pm,v 1.210 2002/05/05 01:59:42 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2507,7 +2507,7 @@ sub symblist {
         if (tie(%hash,'GDBM_File',$ENV{'request.course.fn'}.'_symb.db',
                       &GDBM_WRCREAT,0640)) {
 	    foreach (keys %newhash) {
-                $hash{declutter($_)}=$mapname.'___'.$newhash{$_};
+                $hash{declutter($_)}=&symbclean($mapname.'___'.$newhash{$_});
             }
             if (untie(%hash)) {
 		return 'ok';
@@ -2517,12 +2517,23 @@ sub symblist {
     return 'error';
 }
 
+# --------------------------------------------------------------- Clean-up symb
+
+sub symbclean {
+    my $symb=shift;
+# remove version from map
+    $symb=~s/\.(\d+)\.(\w+)\_\_\_/\.$2\_\_\_/;
+# remove version from URL
+    $symb=~s/\.(\d+)\.(\w+)$/\.$2/;
+    return $symb;
+}
+
 # ------------------------------------------------------ Return symb list entry
 
 sub symbread {
     my $thisfn=shift;
     unless ($thisfn) {
-        if ($ENV{'request.symb'}) { return $ENV{'request.symb'}; }
+        if ($ENV{'request.symb'}) { return &symbclean($ENV{'request.symb'}); }
 	$thisfn=$ENV{'request.filename'};
     }
     $thisfn=declutter($thisfn);
@@ -2581,7 +2592,7 @@ sub symbread {
            } 
         }
         if ($syval) {
-           return $syval.'___'.$thisfn; 
+           return &symbclean($syval.'___'.$thisfn); 
         }
     }
     &appenv('request.ambiguous' => $thisfn);