--- rat/lonwrapper.pm 2016/10/31 21:31:42 1.49.2.2 +++ rat/lonwrapper.pm 2017/03/14 04:12:10 1.49.2.4 @@ -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.2 2016/10/31 21:31:42 raeburn Exp $ +# $Id: lonwrapper.pm,v 1.49.2.4 2017/03/14 04:12:10 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -56,7 +56,7 @@ sub wrapper { if ($is_ext) { if ($env{'form.symb'}) { (undef,undef,my $res) = &Apache::lonnet::decode_symb($env{'form.symb'}); - if ($res =~ /(\#.+)$/) { + if ($res =~ /(#[^#]+)$/) { $anchor = $1; } } elsif ($env{'form.anchor'} ne '') { @@ -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); @@ -105,11 +108,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(<