--- loncom/xml/londefdef.pm 2023/07/13 19:07:27 1.472 +++ loncom/xml/londefdef.pm 2023/11/28 04:48:14 1.474 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.472 2023/07/13 19:07:27 raeburn Exp $ +# $Id: londefdef.pm,v 1.474 2023/11/28 04:48:14 raeburn Exp $ # # # Copyright Michigan State University Board of Trustees @@ -621,6 +621,9 @@ sub start_body { if ($env{'request.use_absolute'}) { $args->{'use_absolute'} = $env{'request.use_absolute'}; } + if ($env{'form.only_body'}) { + $args->{'only_body'} = 1; + } } $currentstring = &Apache::loncommon::start_page($Apache::londefdef::title, @@ -655,9 +658,9 @@ sub start_body { sub edit_controls { my ($nochgview) = @_; - my $result .= ' + my $result = &Apache::lonxml::seteditor_javascript().'
-
'; +
'."\n"; unless ($nochgview) { $result .= '
'. @@ -666,12 +669,20 @@ sub edit_controls {
'; } $result .= ' -
'; +
+ +'."\n"; if ($env{'browser.type'} ne 'explorer' || $env{'browser.version'} > 9) { my $uri = $env{'request.uri'}; - my $daxeurl = '/daxepage'.$uri; - $result .= ''; + if ($uri =~ /\.(xml|html|htm|xhtml|xhtm)$/) { + my %editors = &Apache::loncommon::permitted_editors(); + if ($editors{'daxe'}) { + my $daxeurl = '/daxepage'.$uri; + $result .= ''."\n"; + } + } } if (($env{'request.course.id'}) && ($env{'form.forceedit'})) { my $url=&Apache::lonnet::hreflocation('',$env{'request.filename'});