--- loncom/interface/londocs.pm 2005/11/04 21:36:56 1.209 +++ loncom/interface/londocs.pm 2005/11/17 19:37:30 1.213 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.209 2005/11/04 21:36:56 albertel Exp $ +# $Id: londocs.pm,v 1.213 2005/11/17 19:37:30 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1453,7 +1453,24 @@ sub entryline { 'ct' => 'Cut', 'rn' => 'Rename', 'cp' => 'Copy'); + my $nocopy=0; + if ($url=~/\.(page|sequence)$/) { + foreach (&Apache::lonsequence::attemptread(&Apache::lonnet::filelocation('',$url))) { + my ($title,$url,$ext,$type)=split(/\:/,$_); + if (($url=~/\.(page|sequence)/) && ($type ne 'zombie')) { + $nocopy=1; + last; + } + } + } + my $copylink=' '; if ($env{'form.pagepath'}) { + unless ($nocopy) { + $copylink=(< +$lt{'cp'} +ENDCOPY + } $line.=(< @@ -1477,10 +1494,15 @@ sub entryline { $lt{'ct'} $lt{'rn'} - -$lt{'cp'} +$copylink END } else { + unless ($nocopy) { + $copylink=(< +$lt{'cp'} +ENDCOPY + } $line.=(< @@ -1503,8 +1525,7 @@ END $lt{'ct'} $lt{'rn'} - -$lt{'cp'} +$copylink END } } @@ -1601,7 +1622,7 @@ END } $line.=''. - "$title"; + "$title"; if (($allowed) && ($folder!~/^supplemental/)) { my %lt=&Apache::lonlocal::texthash( 'hd' => 'Hidden', @@ -2077,7 +2098,6 @@ $help{'Caching'}.''." # ================================================================ Main Handler sub handler { my $r = shift; - &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}); &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; return OK if $r->header_only;