--- loncom/interface/lonmsg.pm 2002/05/07 15:24:34 1.32 +++ loncom/interface/lonmsg.pm 2002/08/28 14:11:27 1.37 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging # -# $Id: lonmsg.pm,v 1.32 2002/05/07 15:24:34 matthew Exp $ +# $Id: lonmsg.pm,v 1.37 2002/08/28 14:11:27 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -49,6 +49,8 @@ use Apache::lonnet(); use vars qw($msgcount); use HTML::TokeParser; use Apache::Constants qw(:common); +use Apache::loncommon; +use Apache::lontexconvert; # ===================================================================== Package @@ -312,9 +314,15 @@ sub discrit { my %content=&unpackagemsg($what{$_}); next if ($content{'senderdomain'} eq ''); $content{'message'}=~s/\n/\/g; - $result.='
From: '.$content{'sendername'}.'@'. - $content{'senderdomain'}.' ('.$content{'time'}. - ')
'.$content{'message'}.'
'. + $result.='
From: '. +&Apache::loncommon::aboutmewrapper( + &Apache::loncommon::plainname($content{'sendername'},$content{'senderdomain'}),$content{'sendername'},$content{'senderdomain'}).' ('. +$content{'sendername'}.'@'. + $content{'senderdomain'}.') '.$content{'time'}. + '
Subject: '.$content{'subject'}. + '
'. + &Apache::lontexconvert::msgtexconverted($content{'message'}). + '
'. ''. ''; @@ -342,16 +350,18 @@ sub comprep { my $subject='Re: '.$content{'subject'}; my $dispcrit=''; if (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) { + my $crithelp = Apache::loncommon::help_open_topic("Course_Critical_Message"); $dispcrit= - ' Send as critical message
'. - ' Send as critical message'. - ' and return receipt

'; + ' Send as critical message ' . $crithelp . + '
'. + ' Send as critical message ' . + ' and return receipt' . $crithelp . '

'; } $r->print(<<"ENDREPLY");

Subject:

-

$dispcrit @@ -396,7 +406,7 @@ ENDDISHEADER $ENV{'user.home'}))) { my ($sendtime,$shortsubj,$fromname,$fromdomain,$status)= &Apache::lonmsg::unpackmsgid($_); - unless ($status eq 'deleted') { + unless (($status eq 'deleted') || ($sendtime=~/error/)) { if ($status eq 'new') { $r->print(''); } elsif ($status eq 'read') { @@ -431,10 +441,12 @@ sub compout { my $dismsg=''; my $func='Send New'; if (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) { + my $crithelp = Apache::loncommon::help_open_topic("Course_Critical_Message"); $dispcrit= - ' Send as critical message
'. - ' Send as critical message'. - ' and return receipt

'; + ' Send as critical message ' . $crithelp . + '
'. + ' Send as critical message ' . + ' and return receipt' . $crithelp . '

'; } if ($forwarding) { $dispcrit.=''."\n". @@ -458,7 +471,7 @@ sub compout { $r->print(<<"ENDREC"); - + ENDREC @@ -470,7 +483,7 @@ ENDREC
Username:
Username:
Domain: $domform
Subject:
-

$dispcrit @@ -523,22 +536,24 @@ sub handler { # --------------------------- Get query string for limited number of parameters &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['display','replyto','forward','markread','markdel','markunread', - 'sendreply','compose','sendmail','critical']); + 'sendreply','compose','sendmail','critical','recname','recdom']); # --------------------------------------------------------------- Render Output - $r->print('EMail and Messaging'); - $r->print( - ''); - $r->print('

EMail

'); + $r->print('EMail and Messaging'. + &Apache::loncommon::bodytag('EMail and Messages')); if ($ENV{'form.display'}) { my $msgid=$ENV{'form.display'}; &statuschange($msgid,'read'); my %message=&Apache::lonnet::get('nohist_email',[$msgid]); my %content=&unpackagemsg($message{$msgid}); $r->print('Subject: '.$content{'subject'}. - '
From: '.$content{'sendername'}.' at '. - $content{'senderdomain'}. + '
From: '. +&Apache::loncommon::aboutmewrapper( +&Apache::loncommon::plainname($content{'sendername'},$content{'senderdomain'}), +$content{'sendername'},$content{'senderdomain'}).' ('. + $content{'sendername'}.' at '. + $content{'senderdomain'}.') '. '
Time: '.$content{'time'}.'

'. ''. ''. ''. '
Functions:Mark UnreadDisplay all Messages

'.
-             $content{'message'}.'

'.$content{'citation'}); + &Apache::lontexconvert::msgtexconverted($content{'message'}). + '
'.$content{'citation'}); } elsif ($ENV{'form.replyto'}) { &comprep($r,$ENV{'form.replyto'}); } elsif ($ENV{'form.sendreply'}) {