--- loncom/lonnet/perl/lonnet.pm 2002/08/30 18:36:03 1.276 +++ loncom/lonnet/perl/lonnet.pm 2002/09/14 18:57:59 1.280 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.276 2002/08/30 18:36:03 albertel Exp $ +# $Id: lonnet.pm,v 1.280 2002/09/14 18:57:59 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2341,6 +2341,7 @@ sub createcourse { unless ($nonstandard) { # ------------------------------------------ For standard courses, make top url my $mapurl=&clutter($url); + if ($mapurl eq '/res/') { $mapurl=''; } $ENV{'form.initmap'}=(< @@ -2534,6 +2535,14 @@ sub condval { return $result; } +# ---------------------------------------------------- Devalidate courseresdata + +sub devalidatecourseresdata { + my ($coursenum,$coursedomain)=@_; + my $hashid=$coursenum.':'.$coursedomain; + delete $courseresdatacache{$hashid.'.time'}; +} + # --------------------------------------------------- Course Resourcedata Query sub courseresdata { @@ -2774,7 +2783,7 @@ sub metadata { # Look at timestamp of caching # Everything is cached by the main uri, libraries are never directly cached # - unless (abs($metacache{$uri.':cachedtimestamp'}-time)<600) { + unless (abs($metacache{$uri.':cachedtimestamp'}-time)<600 && !defined($liburi)) { # # Is this a recursive call for a library? # @@ -2961,7 +2970,7 @@ sub symbverify { my $okay=0; if (tie(%bighash,'GDBM_File',$ENV{'request.course.fn'}.'.db', &GDBM_READER(),0640)) { - my $ids=$bighash{'ids_/res/'.$thisfn}; + my $ids=$bighash{'ids_'.&clutter($thisfn)}; unless ($ids) { $ids=$bighash{'ids_/'.$thisfn}; } @@ -3032,7 +3041,7 @@ sub symbread { if (tie(%bighash,'GDBM_File',$ENV{'request.course.fn'}.'.db', &GDBM_READER(),0640)) { # ---------------------------------------------- Get ID(s) for current resource - my $ids=$bighash{'ids_/res/'.$thisfn}; + my $ids=$bighash{'ids_'.&clutter($thisfn)}; unless ($ids) { $ids=$bighash{'ids_/'.$thisfn}; }