--- loncom/lonnet/perl/lonnet.pm 2002/08/30 20:32:21 1.277 +++ 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.277 2002/08/30 20:32:21 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 { @@ -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}; }