--- rat/lonwrapper.pm 2016/11/30 17:40:39 1.49.2.3 +++ rat/lonwrapper.pm 2019/07/28 04:05:38 1.49.2.5 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Wrapper for external and binary files as standalone resources # -# $Id: lonwrapper.pm,v 1.49.2.3 2016/11/30 17:40:39 raeburn Exp $ +# $Id: lonwrapper.pm,v 1.49.2.5 2019/07/28 04:05:38 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -73,7 +73,10 @@ sub wrapper { $args->{'bread_crumbs'} = $brcrum; } if ($absolute) { - $args->{'use_absolute'} = $absolute; + $args->{'use_absolute'} = $absolute; + } + if ($env{'form.only_body'}) { + $args->{'only_body'} = $env{'form.only_body'}; } my $startpage = &Apache::loncommon::start_page('Menu',undef,$args); @@ -155,7 +158,7 @@ sub handler { return OK if $r->header_only; my $url = $r->uri; - my ($is_ext,$brcrum,$absolute,$is_pdf); + my ($is_ext,$brcrum,$absolute,$is_pdf,$cdom,$cnum,$hostname); for ($url){ s|^/adm/wrapper||; @@ -185,10 +188,15 @@ sub handler { $url .= '#'.$env{'form.anchor'}; } } + if (($url =~ /^http:/) && ($ENV{'SERVER_PORT'} == 443)) { + $hostname = $r->hostname(); + } + my $type = 'ext'; $r->print( &Apache::lonextresedit::display_editor($url,$env{'form.folderpath'}, $env{'form.symb'}, - $env{'form.idx'})); + $env{'form.idx'},$type,$cdom, + $cnum,$hostname)); return OK; } elsif ($env{'form.folderpath'} =~ /^supplemental/) { my $crstype = &Apache::loncommon::course_type();