--- loncom/interface/londocs.pm 2005/06/08 17:42:01 1.178 +++ loncom/interface/londocs.pm 2005/06/08 18:49:38 1.179 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.178 2005/06/08 17:42:01 www Exp $ +# $Id: londocs.pm,v 1.179 2005/06/08 18:49:38 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1020,7 +1020,7 @@ sub editor { if ($url=~/^http\:\/\//) { $ext='true'; } $url=~s/\:/\:/g; # Now insert the URL at the bottom - my $newidx=1+$#Apache::lonratedt::resources; + my $newidx=&Apache::lonratedt::getresidx($url); $Apache::lonratedt::resources[$newidx]= $title.':'.$url.':'.$ext.':normal:res'; $Apache::lonratedt::order[1+$#Apache::lonratedt::order]=$newidx; @@ -1070,6 +1070,7 @@ sub editor { if ($url=~m|/+uploaded/\Q$coursedom\E/\Q$coursenum\E/|) { &Apache::lonnet::removeuploadedurl($url); } + &Apache::lonratedt::makezombie($Apache::lonratedt::order[$idx]); for (my $i=$idx;$i<$#Apache::lonratedt::order;$i++) { $Apache::lonratedt::order[$i]= $Apache::lonratedt::order[$i+1]; @@ -1077,6 +1078,7 @@ sub editor { $#Apache::lonratedt::order--; } elsif ($cmd eq 'cut') { my (undef,$url)=split(':',$Apache::lonratedt::resources[$Apache::lonratedt::order[$idx]]); + &Apache::lonratedt::makezombie($Apache::lonratedt::order[$idx]); for (my $i=$idx;$i<$#Apache::lonratedt::order;$i++) { $Apache::lonratedt::order[$i]= $Apache::lonratedt::order[$i+1];