--- loncom/interface/lonmsg.pm 2005/06/07 18:19:32 1.151 +++ loncom/interface/lonmsg.pm 2005/07/08 10:39:49 1.152 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging # -# $Id: lonmsg.pm,v 1.151 2005/06/07 18:19:32 www Exp $ +# $Id: lonmsg.pm,v 1.152 2005/07/08 10:39:49 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -337,7 +337,20 @@ sub del_url_author_res_msg { } return &Apache::lonnet::del('nohist_res_msgs',\@delmsgs,$domain,$author); } +# =================================== Clear out all author messages in URL path +sub clear_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/) { + push (@delmsgs,$_); + } + } + return &Apache::lonnet::del('nohist_res_msgs',\@delmsgs,$domain,$author); +} # ================= Return hash with URLs for which there is a resource message sub all_url_author_res_msg { @@ -564,13 +577,14 @@ sub scrollbuttons { my ($start,$maxdis,$first,$finish,$total)=@_; unless ($total>0) { return ''; } $start++; $maxdis++;$first++;$finish++; - return + return + &mt('Page').': '. ''. ''. ' of '.$maxdis. ''. '
'. - &mt('Messages [_1] through [_2] of [_3]',$first,$finish,$total).''; + &mt('Showing messages [_1] through [_2] of [_3]',$first,$finish,$total).''; } # =============================================================== Folder suffix @@ -872,7 +886,8 @@ sub disnew { TABLEHEAD foreach my $msg (@newmsgs) { $r->print(<<"ENDLINK"); - + $lt{'op'} ENDLINK foreach ('sendtime','from','fromdom','shortsub') { @@ -999,13 +1014,13 @@ ENDDISHEADER my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$origID)= @{$temp[$n]}; if (($status ne 'deleted') && defined($sendtime) && $sendtime!~/error/) { if ($status eq 'new') { - $r->print(''); + $r->print(''); } elsif ($status eq 'read') { - $r->print(''); + $r->print(''); } elsif ($status eq 'replied') { - $r->print(''); + $r->print(''); } else { - $r->print(''); + $r->print(''); } $r->print(''.&mt('Open').''.