--- rat/lonwrapper.pm 2016/10/31 12:59:11 1.52 +++ rat/lonwrapper.pm 2017/02/25 19:39:10 1.57 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Wrapper for external and binary files as standalone resources # -# $Id: lonwrapper.pm,v 1.52 2016/10/31 12:59:11 raeburn Exp $ +# $Id: lonwrapper.pm,v 1.57 2017/02/25 19:39:10 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -54,10 +54,14 @@ sub wrapper { ); my $anchor; - if (($is_ext) && ($env{'form.symb'})) { - (undef,undef,my $res) = &Apache::lonnet::decode_symb($env{'form.symb'}); - if ($res =~ /(#[^#]+)$/) { - $anchor = $1; + if ($is_ext) { + if ($env{'form.symb'}) { + (undef,undef,my $res) = &Apache::lonnet::decode_symb($env{'form.symb'}); + if ($res =~ /(#[^#]+)$/) { + $anchor = $1; + } + } elsif ($env{'form.anchor'} ne '') { + $anchor = '#'.$env{'form.anchor'}; } } @@ -70,7 +74,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); @@ -107,11 +114,16 @@ sub wrapper { $output .= $endpage; return $output; } else { + my $offset = 5; + &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['inhibitmenu']); + if ($env{'form.inhibitmenu'} eq 'yes') { + $offset = 0; + } my $script = &Apache::lonhtmlcommon::scripttag(<