Diff for /loncom/interface/lonchatfetch.pm between versions 1.17 and 1.20

version 1.17, 2005/04/07 06:56:22 version 1.20, 2006/03/23 22:32:10
Line 85  sub handler { Line 85  sub handler {
     my $newstuff='';      my $newstuff='';
     my $bottomid='';      my $bottomid='';
     unless ($env{'form.lastid'}) {       unless ($env{'form.lastid'}) { 
        $include=1;    $include=1; 
        my $html=&Apache::lonxml::xmlbegin();   $newstuff .=
        $newstuff=$html.'<head></head><body bgcolor="#FFFFFF">';      &Apache::loncommon::start_page(undef,undef,
      {'only_body' => 1,
       'bgcolor'   => '#FFFFFF',
       'js_ready'  => 1,});
     }      }
     my @participants=();      my @participants=();
     foreach (@entries) {      foreach (@entries) {
Line 103  sub handler { Line 106  sub handler {
     my ($sdom,$snum,$anon,$contrib)=split(/\:/,      my ($sdom,$snum,$anon,$contrib)=split(/\:/,
      &Apache::lonnet::unescape($msg));       &Apache::lonnet::unescape($msg));
     $contrib=&Apache::lonnet::unescape($contrib);      $contrib=&Apache::lonnet::unescape($contrib);
     $contrib=~s/\n/\<br \/\>/g;      &Apache::lonfeedback::newline_to_br(\$contrib);
     ($contrib,my $errors)=&Apache::lontexconvert::msgtexconverted($contrib);      ($contrib,my $errors)=&Apache::lontexconvert::msgtexconverted($contrib);
     if ($errors) { $contrib.="[Message not fully displayed due to incorrect embedded TeX]"; }      if ($errors) { $contrib.="[Message not fully displayed due to incorrect embedded TeX]"; }
     if ($errors && $snum eq $env{'user.name'} &&      if ($errors && $snum eq $env{'user.name'} &&
Line 150  sub handler { Line 153  sub handler {
  }   }
     }      }
     my $participant_output=join('<br />',sort @participants);      my $participant_output=join('<br />',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(<<ENDDOCUMENT);      $r->print(<<ENDDOCUMENT);
 $html  $start_page
 <head>  <script type="text/javascript">
 <title>The LearningOnline Network with CAPA</title>  
   <meta HTTP-EQUIV="Refresh" CONTENT="5; url=/adm/chatfetch?lastid=$lastid">  
 </head>  
 <body bgcolor="#FFFFFF">  
 <script>  
 parent.chatout.document.writeln('$newstuff');  parent.chatout.document.writeln('$newstuff');
 parent.chatout.scroll(0,10000000);  parent.chatout.scroll(0,10000000);
 </script>  </script>
 $participant_output  $participant_output
 </body>  $end_page
 </html>  
 ENDDOCUMENT  ENDDOCUMENT
     return OK;      return OK;
 }   } 

Removed from v.1.17  
changed lines
  Added in v.1.20


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>