version 1.163, 2005/12/09 21:18:13
|
version 1.166, 2006/01/03 03:18:58
|
Line 266 sub buildmsgid {
|
Line 266 sub buildmsgid {
|
} |
} |
|
|
sub unpackmsgid { |
sub unpackmsgid { |
my ($msgid,$folder)=@_; |
my ($msgid,$folder,$skipstatus)=@_; |
$msgid=&Apache::lonnet::unescape($msgid); |
$msgid=&Apache::lonnet::unescape($msgid); |
my $suffix=&foldersuffix($folder); |
|
my ($sendtime,$shortsubj,$fromname,$fromdomain,$count,$fromcid)=split(/\:/, |
my ($sendtime,$shortsubj,$fromname,$fromdomain,$count,$fromcid)=split(/\:/, |
&Apache::lonnet::unescape($msgid)); |
&Apache::lonnet::unescape($msgid)); |
my %status=&Apache::lonnet::get('email_status'.$suffix,[$msgid]); |
my %status=(); |
if ($status{$msgid}=~/^error\:/) { $status{$msgid}=''; } |
unless ($skipstatus) { |
unless ($status{$msgid}) { $status{$msgid}='new'; } |
my $suffix=&foldersuffix($folder); |
|
%status=&Apache::lonnet::get('email_status'.$suffix,[$msgid]); |
|
if ($status{$msgid}=~/^error\:/) { $status{$msgid}=''; } |
|
unless ($status{$msgid}) { $status{$msgid}='new'; } |
|
} |
return ($sendtime,$shortsubj,$fromname,$fromdomain,$status{$msgid},$fromcid); |
return ($sendtime,$shortsubj,$fromname,$fromdomain,$status{$msgid},$fromcid); |
} |
} |
|
|
Line 857 sub sortedmessages {
|
Line 860 sub sortedmessages {
|
my $msgid=&Apache::lonnet::escape($_); |
my $msgid=&Apache::lonnet::escape($_); |
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$fromcid)= |
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$fromcid)= |
&Apache::lonmsg::unpackmsgid($msgid,$folder); |
&Apache::lonmsg::unpackmsgid($msgid,$folder); |
my $description = &get_course_desc($fromcid); |
my $description; |
|
if ($fromcid) { |
|
$description = &get_course_desc($fromcid); |
|
} |
my @temp1 = ($sendtime,$shortsubj,$fromname,$fromdomain,$status, |
my @temp1 = ($sendtime,$shortsubj,$fromname,$fromdomain,$status, |
$msgid,$description); |
$msgid,$description); |
# Check whether message was sent during blocking period. |
# Check whether message was sent during blocking period. |
Line 912 sub sortedmessages {
|
Line 918 sub sortedmessages {
|
|
|
sub get_course_desc { |
sub get_course_desc { |
my ($fromcid) = @_; |
my ($fromcid) = @_; |
my $description; |
my $description; |
|
if ($fromcid =~ /^\d+$/) { return $description; } |
if (defined($env{'course.'.$fromcid.'.description'})) { |
if (defined($env{'course.'.$fromcid.'.description'})) { |
$description = $env{'course.'.$fromcid.'.description'}; |
$description = $env{'course.'.$fromcid.'.description'}; |
} else { |
} else { |
Line 952 sub disnew {
|
Line 959 sub disnew {
|
my ($sendtime,$shortsubj,$fromname,$fromdom,$status,$fromcid)= |
my ($sendtime,$shortsubj,$fromname,$fromdom,$status,$fromcid)= |
&Apache::lonmsg::unpackmsgid($_); |
&Apache::lonmsg::unpackmsgid($_); |
if (defined($sendtime) && $sendtime!~/error/) { |
if (defined($sendtime) && $sendtime!~/error/) { |
my $description = &get_course_desc($fromcid); |
my $description; |
|
if ($fromcid) { |
|
$description = &get_course_desc($fromcid); |
|
} |
my $numsendtime = $sendtime; |
my $numsendtime = $sendtime; |
$sendtime = &Apache::lonlocal::locallocaltime($sendtime); |
$sendtime = &Apache::lonlocal::locallocaltime($sendtime); |
if ($status eq 'new') { |
if ($status eq 'new') { |