--- loncom/interface/lonchatfetch.pm 2005/04/07 06:56:22 1.17 +++ loncom/interface/lonchatfetch.pm 2006/03/23 22:32:10 1.20 @@ -1,7 +1,7 @@ # The LearningOnline Network # Chat Fetching # -# $Id: lonchatfetch.pm,v 1.17 2005/04/07 06:56:22 albertel Exp $ +# $Id: lonchatfetch.pm,v 1.20 2006/03/23 22:32:10 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -85,9 +85,12 @@ sub handler { my $newstuff=''; my $bottomid=''; unless ($env{'form.lastid'}) { - $include=1; - my $html=&Apache::lonxml::xmlbegin(); - $newstuff=$html.''; + $include=1; + $newstuff .= + &Apache::loncommon::start_page(undef,undef, + {'only_body' => 1, + 'bgcolor' => '#FFFFFF', + 'js_ready' => 1,}); } my @participants=(); foreach (@entries) { @@ -103,7 +106,7 @@ sub handler { my ($sdom,$snum,$anon,$contrib)=split(/\:/, &Apache::lonnet::unescape($msg)); $contrib=&Apache::lonnet::unescape($contrib); - $contrib=~s/\n/\
/g; + &Apache::lonfeedback::newline_to_br(\$contrib); ($contrib,my $errors)=&Apache::lontexconvert::msgtexconverted($contrib); if ($errors) { $contrib.="[Message not fully displayed due to incorrect embedded TeX]"; } if ($errors && $snum eq $env{'user.name'} && @@ -150,21 +153,19 @@ sub handler { } } my $participant_output=join('
',sort @participants); - my $html=&Apache::lonxml::xmlbegin(); + my $start_page = + &Apache::loncommon::start_page('Chat',undef, + {'redirect' => [5,"/adm/chatfetch?lastid=$lastid"], + 'only_body' => 1,}); + my $end_page = &Apache::loncommon::end_page(); $r->print(< -The LearningOnline Network with CAPA - - - - $participant_output - - +$end_page ENDDOCUMENT return OK; }