--- loncom/interface/lonmsg.pm 2003/12/30 22:19:18 1.75
+++ loncom/interface/lonmsg.pm 2004/01/31 02:42:44 1.84
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.75 2003/12/30 22:19:18 www Exp $
+# $Id: lonmsg.pm,v 1.84 2004/01/31 02:42:44 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -275,7 +275,7 @@ sub retrieve_author_res_msg {
my $url=shift;
$url=&Apache::lonnet::declutter($url);
my ($domain,$author)=($url=~/^(\w+)\/(\w+)\//);
- my %errormsgs=&Apache::lonnet::dump('nohist_res_msgs',$1,$2);
+ my %errormsgs=&Apache::lonnet::dump('nohist_res_msgs',$domain,$author);
my $msgs='';
foreach (keys %errormsgs) {
if ($_=~/^\Q$url\E\_\d+$/) {
@@ -294,6 +294,14 @@ sub retrieve_author_res_msg {
sub del_url_author_res_msg {
my $url=shift;
$url=&Apache::lonnet::declutter($url);
+ my ($domain,$author)=($url=~/^(\w+)\/(\w+)\//);
+ my @delmsgs=();
+ foreach (&Apache::lonnet::getkeys('nohist_res_msgs',$domain,$author)) {
+ if ($_=~/^\Q$url\E\_\d+$/) {
+ push (@delmsgs,$_);
+ }
+ }
+ return &Apache::lonnet::del('nohist_res_msgs',\@delmsgs,$domain,$author);
}
# ================= Return hash with URLs for which there is a resource message
@@ -301,7 +309,7 @@ sub del_url_author_res_msg {
sub all_url_author_res_msg {
my ($author,$domain)=@_;
my %returnhash=();
- foreach (&Apache::lonnet::getkeys('nohist_res_msgs')) {
+ foreach (&Apache::lonnet::getkeys('nohist_res_msgs',$domain,$author)) {
$_=~/^(.+)\_\d+/;
$returnhash{$1}=1;
}
@@ -388,7 +396,7 @@ sub user_crit_received {
my %contents=&unpackagemsg($message{$msgid},1);
my $status='rec: '.($contents{'sendback'}?
&user_normal_msg($contents{'sendername'},$contents{'senderdomain'},
- &mt('Receipt').': '.$ENV{'user.name'}.' at '.$ENV{'user.domain'},
+ &mt('Receipt').': '.$ENV{'user.name'}.' '.&mt('at').' '.$ENV{'user.domain'}.', '.$contents{'subject'},
&mt('User').' '.$ENV{'user.name'}.' '.&mt('at').' '.$ENV{'user.domain'}.
' acknowledged receipt of message'."\n".' "'.
$contents{'subject'}.'"'."\n".&mt('dated').' '.
@@ -591,7 +599,9 @@ $content{'sendername'}.'@'.
'
'.&mt('Subject').': '.$content{'subject'}.
'
'. &Apache::lontexconvert::msgtexconverted($content{'message'}). - ''. + ''. +&mt('You have to confirm that you received this message. After confirmation, this message will be moved to your regular inbox'). + '
'. - &Apache::lontexconvert::msgtexconverted($content{'message'}). + &Apache::lontexconvert::msgtexconverted($content{'message'},1). '