--- rat/lonwrapper.pm 2016/01/26 14:30:40 1.50 +++ rat/lonwrapper.pm 2016/10/31 19:49:05 1.53 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Wrapper for external and binary files as standalone resources # -# $Id: lonwrapper.pm,v 1.50 2016/01/26 14:30:40 raeburn Exp $ +# $Id: lonwrapper.pm,v 1.53 2016/10/31 19:49:05 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -53,7 +53,19 @@ sub wrapper { 'show' => 'Show content in pop-up window', ); - my $noiframe = &Apache::loncommon::modal_link($url,$lt{'show'},500,400); + my $anchor; + 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'}; + } + } + + my $noiframe = &Apache::loncommon::modal_link($url.$anchor,$lt{'show'},500,400); my $args = {'bgcolor' => '#FFFFFF'}; if ($forcereg) { $args->{'force_register'} = $forcereg; @@ -91,7 +103,7 @@ sub wrapper { ''; } else { $output .= '