--- rat/lonwrapper.pm 2003/05/13 15:13:17 1.13 +++ rat/lonwrapper.pm 2004/09/18 16:32:17 1.16 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Wrapper for external and binary files as standalone resources # -# $Id: lonwrapper.pm,v 1.13 2003/05/13 15:13:17 www Exp $ +# $Id: lonwrapper.pm,v 1.16 2004/09/18 16:32:17 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -45,7 +45,7 @@ use Apache::lonmenu; sub handler { my $r=shift; - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; return OK if $r->header_only; @@ -54,8 +54,11 @@ sub handler { ['wrapperdisplay']); my $orgurl=$r->uri; my $url=$orgurl; + $orgurl.=(($orgurl=~/\?/)?'&':'?').$ENV{'QUERY_STRING'}; + $orgurl.=(($orgurl=~/\?/)?'&':'?').'wrapperdisplay=menu'; $url=~s/^\/adm\/wrapper//; $url=~s/^\/ext\//http\:\/\//; + $url=~s|:|:|g; if ($ENV{'form.wrapperdisplay'} eq 'menu') { # # Producing the menu buttons @@ -76,9 +79,6 @@ sub handler { # # This is not homework # - if ($url=~/^\/uploaded\//) { - $url=&Apache::lonnet::tokenwrapper($url); - } $url.=(($url=~/\?/)?'&':'?').$ENV{'QUERY_STRING'}; # reappend the query arguments my $events='onLoad="'.&Apache::lonmenu::loadevents. @@ -104,7 +104,7 @@ sub handler { $script - +