version 1.11, 2003/06/23 21:30:42
|
version 1.13, 2004/06/27 17:14:28
|
Line 29
|
Line 29
|
package Apache::lonchatfetch; |
package Apache::lonchatfetch; |
|
|
use strict; |
use strict; |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common :http); |
use Apache::lontexconvert; |
use Apache::lontexconvert; |
use Apache::loncommon; |
use Apache::loncommon; |
use Apache::lonnet; |
use Apache::lonnet; |
Line 37 use Apache::lonnet;
|
Line 37 use Apache::lonnet;
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
|
|
|
if (! &Apache::lonnet::allowed('pch',$ENV{'request.course.id'}. |
|
($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:'')) |
|
) { |
|
return HTTP_NOT_ACCEPTABLE; |
|
} |
|
|
my $loaderror=&Apache::lonnet::overloaderror($r); |
my $loaderror=&Apache::lonnet::overloaderror($r); |
if ($loaderror) { return $loaderror; } |
if ($loaderror) { return $loaderror; } |
$loaderror= |
$loaderror= |
Line 118 sub handler {
|
Line 124 sub handler {
|
$sender=&Apache::loncommon::screenname($snum,$sdom); |
$sender=&Apache::loncommon::screenname($snum,$sdom); |
unless ($sender) { $sender="Anonymous"; } |
unless ($sender) { $sender="Anonymous"; } |
} |
} |
$sender=~s/\'/\"/g; |
$sender=~s/\'/\&\#39\;/g; |
my $color=$sender; |
my $color=$sender; |
$color=~tr/a-j/0-9/; |
$color=~tr/a-j/0-9/; |
$color=~tr/A-J/0-9/; |
$color=~tr/A-J/0-9/; |