--- loncom/interface/lonchatfetch.pm 2006/11/29 19:45:55 1.32
+++ loncom/interface/lonchatfetch.pm 2010/05/03 16:41:51 1.37
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Chat Fetching
#
-# $Id: lonchatfetch.pm,v 1.32 2006/11/29 19:45:55 raeburn Exp $
+# $Id: lonchatfetch.pm,v 1.37 2010/05/03 16:41:51 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -69,13 +69,6 @@ sub handler {
return HTTP_NOT_ACCEPTABLE;
}
- my $loaderror=&Apache::lonnet::overloaderror($r);
- if ($loaderror) { return $loaderror; }
- $loaderror=
- &Apache::lonnet::overloaderror($r,
- $env{'course.'.$env{'request.course.id'}.'.home'});
- if ($loaderror) { return $loaderror; }
-
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
return OK if $r->header_only;
@@ -128,10 +121,16 @@ sub handler {
$contrib=&unescape($contrib);
&Apache::lonfeedback::newline_to_br(\$contrib);
($contrib,my $errors)=&Apache::lontexconvert::msgtexconverted($contrib);
- if ($errors) { $contrib.=&mt('[Message not fully displayed due to incorrect embedded TeX]'); }
+ if ($errors) {
+ $contrib.=' '
+ .&mt('(Message not fully displayed due to incorrect embedded TeX.)')
+ .'';
+ }
if ($errors && $snum eq $env{'user.name'} &&
$sdom eq $env{'user.domain'} ) {
- $contrib.='
'.&mt('[TeX error message: [_1]',$errors);
+ $contrib.='
'
+ .&mt('TeX error message: [_1]',$errors)
+ .'';
}
$contrib=~s/\n/ /g;
$contrib=~s/\'/\&\#39\;/g;
@@ -163,9 +162,9 @@ sub handler {
$color=substr($color,0,6);
my $timestamp=localtime($msgtime);
my ($mhour,$mmin,$msec)=($timestamp=~/(\d\d)\:(\d\d)\:(\d\d)/);
- $newstuff.=''.
+ $newstuff.=''.
$sender.' ('.$mhour.':'.$mmin.':'.$msec.'): '.
- $contrib."
";
+ $contrib."
";
$bottomid='LC_'.$id;
} else {
$entry=~/^(\w+)/;
@@ -178,15 +177,21 @@ sub handler {
$refresh_cmd .= "&group=$group";
}
my $headarg;
- my ($blocked,$blocktext) = &blockstatus();
+ my ($blocked,$blocktext) = blockstatus();
if ($blocked) {
$newstuff = $blocktext;
$headarg = {'only_body' => 1,};
+
+ $r->print(<
+ parent.location.href="/adm/blockingstatus/?activity=chat"
+
+ENDSCRIPT
} else {
$headarg = {'redirect' => [5,$refresh_cmd,1],
'only_body' => 1,};
}
- my $start_page = &Apache::loncommon::start_page('Chat',undef,$headarg);
+ my $start_page = &Apache::loncommon::start_page('Chat Room',undef,$headarg);
my $end_page = &Apache::loncommon::end_page();
$r->print(<
',$endblocktime);
+ $output .= &mt('Chat Room will be unavailable to you until [_1] because communication is blocked in one or more of your courses:',$endblocktime).'
';
foreach my $course (keys(%setters)) {
my %courseinfo=&Apache::lonnet::coursedescription($course);
for (my $i=0; $i<@{$setters{$course}{staff}}; $i++) {