--- loncom/xml/londefdef.pm 2023/03/25 18:38:27 1.470 +++ 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.470 2023/03/25 18:38:27 raeburn Exp $ +# $Id: londefdef.pm,v 1.474 2023/11/28 04:48:14 raeburn Exp $ # # # Copyright Michigan State University Board of Trustees @@ -591,9 +591,18 @@ sub start_body { &Apache::lonhtmlcommon::clear_breadcrumbs(); if ($env{'request.state'} eq 'construct') { my $url=&Apache::lonnet::hreflocation('',$env{'request.filename'}); + my $text = 'Authoring Space'; + my $href = &Apache::loncommon::authorspace($url); + if ($env{'request.course.id'}) { + my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; + my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; + if ($href eq "/priv/$cdom/$cnum/") { + $text = 'Course Authoring Space'; + } + } &Apache::lonhtmlcommon::add_breadcrumb({ - 'text' => 'Authoring Space', - 'href' => &Apache::loncommon::authorspace($url), + 'text' => $text, + 'href' => $href, }); &Apache::lonhtmlcommon::add_breadcrumb({ 'text' => 'HTML Editor', @@ -612,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, @@ -646,9 +658,9 @@ sub start_body { sub edit_controls { my ($nochgview) = @_; - my $result .= ' + my $result = &Apache::lonxml::seteditor_javascript().'
-
'; +
'."\n"; unless ($nochgview) { $result .= '
'. @@ -657,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'}); @@ -4313,10 +4333,10 @@ sub resize_image { $height_param=$TeXwidth/$old_width_param*$height_param; } } elsif ($TeXheight) { - $height_param = $TeXheight; if ($height_param) { $width_param = $TeXheight/$height_param*$width_param; } + $height_param = $TeXheight; } elsif ($width) { my $old_width_param=$width_param; $width_param = $width*$scaling;