--- loncom/interface/londocs.pm 2012/11/27 23:34:41 1.510 +++ loncom/interface/londocs.pm 2012/11/29 20:37:07 1.511 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.510 2012/11/27 23:34:41 raeburn Exp $ +# $Id: londocs.pm,v 1.511 2012/11/29 20:37:07 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2434,7 +2434,7 @@ $form_common.' if ($title) { $url .= '&title='.&HTML::Entities::encode($renametitle,'<>&"'); } - if ($orderidx) { + if ($isexternal && $orderidx) { $url .= '&idx='.$orderidx; } } @@ -2451,25 +2451,19 @@ $form_common.' my $fileloc = &Apache::lonnet::declutter(&Apache::lonnet::filelocation('',$orig_url)); if ($isexternal) { - $editlink = + $editlink = ' '. &Apache::lonextresedit::extedit_form(0,$residx,$orig_url,$title,$pathitem); - } else { + } elsif (!$isfolder && !$ispage) { my ($cfile,$home,$switchserver,$forceedit,$forceview) = &Apache::lonnet::can_edit_resource($fileloc,$coursenum,$coursedom,$orig_url); - my $geteditlink; - if ($supplementalflag) { - if ($orig_url eq "/adm/$env{'user.domain'}/$env{'user.name'}/aboutme") { - $geteditlink = 1; - } - } elsif (($cfile ne '') && ($symb ne '')) { - $geteditlink = 1; - } - if ($geteditlink) { + if (($cfile ne '') && ($symb ne '' || $supplementalflag)) { my $jscall = &Apache::lonhtmlcommon::jump_to_editres($cfile,$home, $switchserver, $forceedit, - undef,$symb); + undef,$symb, + &escape($env{'form.folderpath'}), + $renametitle); if ($jscall) { $editlink = ' '.&mt('Edit').'';