--- rat/lonwrapper.pm 2011/01/03 14:19:41 1.40 +++ rat/lonwrapper.pm 2016/02/22 03:36:52 1.51 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Wrapper for external and binary files as standalone resources # -# $Id: lonwrapper.pm,v 1.40 2011/01/03 14:19:41 raeburn Exp $ +# $Id: lonwrapper.pm,v 1.51 2016/02/22 03:36:52 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -33,36 +33,115 @@ use strict; use Apache::Constants qw(:common); use Apache::lonenc(); use Apache::lonnet; +use Apache::lonlocal; +use Apache::loncommon(); +use Apache::lonhtmlcommon(); +use Apache::lonextresedit(); +use Apache::lonexttool(); +use LONCAPA qw(:DEFAULT :match);; # ================================================================ Main Handler sub wrapper { - my $url = shift; + my ($url,$brcrum,$absolute,$is_ext,$is_pdf,$exttool,$title) = @_; - my $startpage = Apache::loncommon::start_page('Menu',undef, - { 'force_register' =>1, 'bgcolor' => '#FFFFFF',}) ; - my $endpage = Apache::loncommon::end_page(); - - my $script = Apache::lonhtmlcommon::scripttag(<