--- loncom/interface/londocs.pm 2012/11/27 23:34:41 1.510
+++ loncom/interface/londocs.pm 2012/12/01 15:59:01 1.513
@@ -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.513 2012/12/01 15:59:01 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').'';
@@ -3298,7 +3292,7 @@ sub handler {
if ($mapurl eq 'default') {
$maptitle = 'Main Course Documents';
}
- $path .= ($path ne '')? '&' : ''.
+ $path .= (($path ne '')? '&' : '').
&Apache::lonhtmlcommon::entity_encode($mapurl).'&'.
&Apache::lonhtmlcommon::entity_encode($maptitle).
':'.$mapresobj->randompick().
@@ -3602,10 +3596,6 @@ sub handler {
'prev' => 'Preview',
'lnk' => 'Add Link',
'parse' => 'Upload embedded images/multimedia files if HTML file',
- 'nd' => 'Upload Document',
- 'pm' => 'Published Map',
- 'sd' => 'Special Document',
- 'mo' => 'More Options',
);
# -----------------------------------------------------------------------------
my $fileupload=(<