--- loncom/interface/lonannounce.pm 2006/04/22 16:32:55 1.49
+++ loncom/interface/lonannounce.pm 2006/04/23 07:16:07 1.51
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Announce
#
-# $Id: lonannounce.pm,v 1.49 2006/04/22 16:32:55 albertel Exp $
+# $Id: lonannounce.pm,v 1.51 2006/04/23 07:16:07 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -160,7 +160,7 @@ sub emptycell {
sub normalcell {
my ($day,$month,$year,$text)=@_;
- my $output='';
+ my $output;
my @items=&order($text);
foreach my $item (@items) {
if ($item) {
@@ -189,8 +189,10 @@ sub normalcell {
$fullmsg=~s/[\n\r]/\\n/gs;
$fullmsg=&HTML::Entities::encode($fullmsg,'<>&"\'');
$fullmsg=~s/&/\\&/g;
+ my $short_msg = substr($msg,0,20).((length($msg) > 20)?'...':'');
+ if (defined($output)) { $output.='
'; }
$output.=''.
- substr($msg,0,20).'...
';
+ $short_msg.'';
}
}
return '