--- rat/lonwrapper.pm 2003/05/13 15:13:17 1.13 +++ rat/lonwrapper.pm 2005/02/17 09:09:57 1.17 @@ -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.17 2005/02/17 09:09:57 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -25,13 +25,6 @@ # # http://www.lon-capa.org/ # -# (Edit Handler for RAT Maps -# (TeX Content Handler -# -# 05/29/00,05/30 Gerd Kortemeyer) -# 7/1,6/30 Gerd Kortemeyer) -# -# 7/5 Gerd Kortemeyer package Apache::lonwrapper; @@ -45,7 +38,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 +47,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 +72,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 +97,7 @@ sub handler { $script - +