--- loncom/interface/lonextresedit.pm 2012/11/27 23:34:41 1.1 +++ loncom/interface/lonextresedit.pm 2012/12/03 14:47:30 1.4 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: lonextresedit.pm,v 1.1 2012/11/27 23:34:41 raeburn Exp $ +# $Id: lonextresedit.pm,v 1.4 2012/12/03 14:47:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -211,7 +211,7 @@ sub extedit_form { $urlid = 'suppexturl'; } my ($link,$legend,$active,$srcclass,$extsrc,$preview,$title,$save, - $fieldsetstyle,$action,$hiddenelem); + $fieldsetstyle,$action,$hiddenelem,$form); $fieldsetstyle = 'display: none;'; $action = '/adm/coursedocs'; if ($residx) { @@ -228,9 +228,9 @@ sub extedit_form { &HTML::Entities::encode(&escape($orig_title),'<>&"').'" />'; } } else { - $link = ''.$lt{'ed'}.''; + $link = ''.$lt{'ed'}.' '."\n"; $size = 40; - $active = ''; + $active = ''; } $formname = "editext_$residx"; $fieldsetid = "uploadext$residx"; @@ -252,10 +252,9 @@ sub extedit_form { $save = $lt{'al'}; $pathitem .= '
'; } - return < -
+
$legend $active @@ -275,7 +274,11 @@ $hiddenelem
ENDFORM - + if (wantarray) { + return ($link,$form); + } else { + return $link.$form; + } } sub display_editor { @@ -291,11 +294,7 @@ sub display_editor { &Apache::lonnet::decode_symb($symb); $title = &Apache::lonnet::gettitle($symb); my $path = &Apache::lonnet::getdocspath($symb); - if ($map =~ /\.page$/) { - $pathitem = ''; - } else { - $pathitem = ''; - } + $pathitem = ''; } my $js = &Apache::lonhtmlcommon::scripttag(&extedit_javascript()); my $args = { 'force_register' => $env{'form.register'} };