--- loncom/lonnet/perl/lonnet.pm 2003/10/12 22:02:44 1.430 +++ loncom/lonnet/perl/lonnet.pm 2003/10/23 21:01:54 1.432 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.430 2003/10/12 22:02:44 www Exp $ +# $Id: lonnet.pm,v 1.432 2003/10/23 21:01:54 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3848,18 +3848,25 @@ sub metadata { $lcmetacache{':packages'}=$package.$keyroot; } foreach (keys %packagetab) { - if ($_=~/^$package\&/) { + my $part=$keyroot; + $part=~s/^\_//; + if ($_=~/^\Q$package\E\&/ || + $_=~/^\Q$package\E_0\&/) { my ($pack,$name,$subp)=split(/\&/,$_); # ignore package.tab specified default values # here &package_tab_default() will fetch those if ($subp eq 'default') { next; } my $value=$packagetab{$_}; - my $part=$keyroot; - $part=~s/^\_//; + my $unikey; + if ($pack =~ /_0$/) { + $unikey='parameter_0_'.$name; + $part=0; + } else { + $unikey='parameter'.$keyroot.'_'.$name; + } if ($subp eq 'display') { $value.=' [Part: '.$part.']'; } - my $unikey='parameter'.$keyroot.'_'.$name; $lcmetacache{':'.$unikey.'.part'}=$part; $metathesekeys{$unikey}=1; unless (defined($lcmetacache{':'.$unikey.'.'.$subp})) { @@ -4037,17 +4044,18 @@ sub symblist { sub symbverify { my ($symb,$thisfn)=@_; - $thisfn=&declutter($thisfn); + $thisfn=&symbclean(&declutter($thisfn)); # direct jump to resource in page or to a sequence - will construct own symbs if ($thisfn=~/\.(page|sequence)$/) { return 1; } # check URL part my ($map,$resid,$url)=&decode_symb($symb); - unless (&symbclean($url) eq &symbclean($thisfn)) { return 0; } + unless ($url eq $thisfn) { return 0; } $symb=&symbclean($symb); my %bighash; my $okay=0; + if (tie(%bighash,'GDBM_File',$ENV{'request.course.fn'}.'.db', &GDBM_READER(),0640)) { my $ids=$bighash{'ids_'.&clutter($thisfn)};