version 1.12, 2001/08/03 14:00:07
|
version 1.13, 2001/08/03 14:54:52
|
Line 202 sub statuschange {
|
Line 202 sub statuschange {
|
&Apache::lonnet::put('email_status',{$msgid => $newstatus}); |
&Apache::lonnet::put('email_status',{$msgid => $newstatus}); |
} |
} |
} |
} |
# ===================================================================== Handler |
# ==================================================== Display Critical Message |
|
|
sub discrit { |
sub discrit { |
my $r=shift; |
my $r=shift; |
Line 216 sub discrit {
|
Line 216 sub discrit {
|
$r->print('<hr>From: <b>'.$content{'sendername'}.'@'. |
$r->print('<hr>From: <b>'.$content{'sendername'}.'@'. |
$content{'senderdomain'}.'</b> ('.$content{'time'}. |
$content{'senderdomain'}.'</b> ('.$content{'time'}. |
')<br><blockquote>'.$content{'message'}.'</blockquote>'. |
')<br><blockquote>'.$content{'message'}.'</blockquote>'. |
'<input type=submit name="rec_'.$_.'" value="Confirm Receipt">'); |
'<input type=submit name="rec_'.$_.'" value="Confirm Receipt">'. |
|
'<input type=submit name="reprec_'.$_.'" value="Confirm Receipt and Reply">'); |
} sort keys %what; |
} sort keys %what; |
$r->print('</form>'); |
$r->print('</form>'); |
} |
} |
|
|
|
# =============================================================== Compose reply |
|
|
|
sub comprep { |
|
my ($r,$msgid)=@_; |
|
my %message=&Apache::lonnet::get('nohist_email',[$msgid]); |
|
my %content=&unpackagemsg($message{$msgid}); |
|
my $quotemsg='> '.$content{'message'}; |
|
$quotemsg=~s/\r/\n/g; |
|
$quotemsg=~s/\f/\n/g; |
|
$quotemsg=~s/\n+/\n\> /g; |
|
my $subject='Re: '.$content{'subject'}; |
|
my $dispcrit=''; |
|
if (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) { |
|
$dispcrit= |
|
'<input type=checkbox name=critmsg> Send as critical message<p>'; |
|
} |
|
$r->print(<<"ENDREPLY"); |
|
<form action="/adm/email" method=post> |
|
<input type=hidden name=sendreply value="$msgid"> |
|
Subject: <input type=text size=50 name=subject value="$subject"><p> |
|
<textarea name=message cols=60 rows=10> |
|
$quotemsg |
|
</textarea><p> |
|
$dispcrit |
|
<input type=submit value="Send Reply"> |
|
</form> |
|
ENDREPLY |
|
} |
|
|
|
# ===================================================================== Handler |
|
|
sub handler { |
sub handler { |
my $r=shift; |
my $r=shift; |
|
|
Line 266 sub handler {
|
Line 298 sub handler {
|
'"><b>Reply</b></a><hr><pre>'. |
'"><b>Reply</b></a><hr><pre>'. |
$content{'message'}.'</pre><hr>'.$content{'citation'}); |
$content{'message'}.'</pre><hr>'.$content{'citation'}); |
} elsif ($ENV{'form.replyto'}) { |
} elsif ($ENV{'form.replyto'}) { |
my $msgid=$ENV{'form.replyto'}; |
&comprep($r,$ENV{'form.replyto'}); |
my %message=&Apache::lonnet::get('nohist_email',[$msgid]); |
|
my %content=&unpackagemsg($message{$msgid}); |
|
my $quotemsg='> '.$content{'message'}; |
|
$quotemsg=~s/\r/\n/g; |
|
$quotemsg=~s/\f/\n/g; |
|
$quotemsg=~s/\n+/\n\> /g; |
|
my $subject='Re: '.$content{'subject'}; |
|
my $dispcrit=''; |
|
if (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) { |
|
$dispcrit= |
|
'<input type=checkbox name=critmsg> Send as critical message<p>'; |
|
} |
|
$r->print(<<"ENDREPLY"); |
|
<form action="/adm/email" method=post> |
|
<input type=hidden name=sendreply value="$msgid"> |
|
Subject: <input type=text size=50 name=subject value="$subject"><p> |
|
<textarea name=message cols=60 rows=10> |
|
$quotemsg |
|
</textarea><p> |
|
$dispcrit |
|
<input type=submit value="Send Reply"> |
|
</form> |
|
ENDREPLY |
|
} elsif ($ENV{'form.sendreply'}) { |
} elsif ($ENV{'form.sendreply'}) { |
my $msgid=$ENV{'form.sendreply'}; |
my $msgid=$ENV{'form.sendreply'}; |
my %message=&Apache::lonnet::get('nohist_email',[$msgid]); |
my %message=&Apache::lonnet::get('nohist_email',[$msgid]); |
Line 314 ENDREPLY
|
Line 323 ENDREPLY
|
$r->print('<b>Confirming Receipt:</b> '. |
$r->print('<b>Confirming Receipt:</b> '. |
&user_crit_received($1).'<br>'); |
&user_crit_received($1).'<br>'); |
} |
} |
|
if ($_=~/^form\.reprec\_(.*)$/) { |
|
my $msgid=$1; |
|
$r->print('<b>Confirming Receipt:</b> '. |
|
&user_crit_received($msgid).'<br>'); |
|
&comprep($r,$msgid); |
|
} |
} keys %ENV; |
} keys %ENV; |
&discrit($r); |
&discrit($r); |
} elsif ($ENV{'form.critical'}) { |
} elsif ($ENV{'form.critical'}) { |