--- loncom/xml/lonxml.pm 2006/03/10 23:49:35 1.401 +++ loncom/xml/lonxml.pm 2006/03/23 23:48:10 1.402 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.401 2006/03/10 23:49:35 albertel Exp $ +# $Id: lonxml.pm,v 1.402 2006/03/23 23:48:10 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1458,17 +1458,13 @@ sub handler { my $result = ''; my $filecontents=&Apache::lonnet::getfile($file); if ($filecontents eq -1) { - my $bodytag=&Apache::loncommon::bodytag('File Error'); + my $start_page=&Apache::loncommon::start_page('File Error'); + my $end_page=&Apache::loncommon::end_page('File Error'); my $fnf=&mt('File not found'); $result=(< - -$fnf - -$bodytag +$start_page $fnf: $file - - +$end_page ENDNOTFOUND $filecontents=''; if ($env{'request.state'} ne 'published') { @@ -1506,18 +1502,21 @@ ENDNOTFOUND if ($env{'form.editmode'} && (!($env{'form.viewmode'}))) { my $displayfile=$request->uri; $displayfile=~s/^\/[^\/]*//; - my $bodytag=''; - if ($env{'environment.remote'} eq 'off') { - $bodytag=&Apache::loncommon::bodytag(); + my %options = (); + if ($env{'environment.remote'} ne 'off') { + $options{'bgcolor'} = '#FFFFFF'; + $options{'only_body'} = 1; } - $result=''.$bodytag. + my $start_page = &Apache::loncommon::start_page(undef,undef, + \%options); + $result=$start_page. &Apache::lonxml::message_location().'

'. $displayfile. - '

'; + ''.&Apache::loncommon::end_page(); $result=&inserteditinfo($result,$filecontents,$filetype); } } - if ($filetype eq 'html') { writeallows($request->uri); } + if ($filetype eq 'html') { &writeallows($request->uri); } &Apache::lonxml::add_messages(\$result);