--- loncom/lonnet/perl/lonnet.pm 2003/10/30 22:52:25 1.437 +++ loncom/lonnet/perl/lonnet.pm 2003/10/31 22:20:37 1.438 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.437 2003/10/30 22:52:25 albertel Exp $ +# $Id: lonnet.pm,v 1.438 2003/10/31 22:20:37 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3993,13 +3993,13 @@ sub gettitle { sub symblist { my ($mapname,%newhash)=@_; - $mapname=declutter($mapname); + $mapname=&deversion(&declutter($mapname)); my %hash; if (($ENV{'request.course.fn'}) && (%newhash)) { if (tie(%hash,'GDBM_File',$ENV{'request.course.fn'}.'_symb.db', &GDBM_WRCREAT(),0640)) { foreach (keys %newhash) { - $hash{declutter($_)}=$mapname.'___'.$newhash{$_}; + $hash{declutter($_)}=$mapname.'___'.&deversion($newhash{$_}); } if (untie(%hash)) { return 'ok'; @@ -4091,6 +4091,12 @@ sub fixversion { return &declutter($uri); } +sub deversion { + my $url=shift; + $url=~s/\.\d+\.(\w+)$/\.$1/; + return $url; +} + # ------------------------------------------------------ Return symb list entry sub symbread {