version 1.69, 2003/10/15 21:10:24
|
version 1.71, 2003/12/05 22:14:15
|
Line 270 sub author_res_msg {
|
Line 270 sub author_res_msg {
|
my ($filename,$message)=@_; |
my ($filename,$message)=@_; |
unless ($message) { return 'empty'; } |
unless ($message) { return 'empty'; } |
$filename=&Apache::lonnet::declutter($filename); |
$filename=&Apache::lonnet::declutter($filename); |
my ($domain,$author,@dummy)=split(/\//,$filename); |
my ($domain,$author)=split(/\//,$filename); |
my $homeserver=&Apache::lonnet::homeserver($author,$domain); |
my $homeserver=&Apache::lonnet::homeserver($author,$domain); |
if ($homeserver ne 'no_host') { |
if ($homeserver ne 'no_host') { |
my $id=unpack("%32C*",$message); |
my $id=unpack("%32C*",$message); |
my $msgid; |
my $msgid; |
($msgid,$message)=&packagemsg($filename,$message); |
($msgid,$message)=&packagemsg("Error: [$filename]",$message); |
|
#FIXME this should be nohist_res_msg, we need to provide an interface |
|
# to this hash BUG#2444 |
|
#return &Apache::lonnet::reply('put:'.$domain.':'.$author. |
|
# ':nohist_res_msg:'. |
|
# &Apache::lonnet::escape($filename.'_'.$id).'='. |
|
# &Apache::lonnet::escape($message),$homeserver); |
return &Apache::lonnet::reply('put:'.$domain.':'.$author. |
return &Apache::lonnet::reply('put:'.$domain.':'.$author. |
':nohist_res_msgs:'. |
':nohist_email:'. |
&Apache::lonnet::escape($filename.'_'.$id).'='. |
&Apache::lonnet::escape($msgid).'='. |
&Apache::lonnet::escape($message),$homeserver); |
&Apache::lonnet::escape($message),$homeserver); |
} |
} |
return 'no_host'; |
return 'no_host'; |
} |
} |
Line 1060 $content{'sendername'},$content{'senderd
|
Line 1066 $content{'sendername'},$content{'senderd
|
&statuschange($msgid,'replied'); |
&statuschange($msgid,'replied'); |
if ((($ENV{'form.critmsg'}) || ($ENV{'form.sendbck'})) && |
if ((($ENV{'form.critmsg'}) || ($ENV{'form.sendbck'})) && |
(&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))) { |
(&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))) { |
$r->print(&mt('Sending critical').': '. |
$r->print(&mt('Sending critical message').': '. |
&user_crit_msg($content{'sendername'}, |
&user_crit_msg($content{'sendername'}, |
$content{'senderdomain'}, |
$content{'senderdomain'}, |
&Apache::lonfeedback::clear_out_html($ENV{'form.subject'}), |
&Apache::lonfeedback::clear_out_html($ENV{'form.subject'}), |
Line 1118 $content{'sendername'},$content{'senderd
|
Line 1124 $content{'sendername'},$content{'senderd
|
} elsif ($ENV{'form.recordftf'}) { |
} elsif ($ENV{'form.recordftf'}) { |
&facetoface($r,$ENV{'form.recordftf'}); |
&facetoface($r,$ENV{'form.recordftf'}); |
} elsif ($ENV{'form.sendmail'}) { |
} elsif ($ENV{'form.sendmail'}) { |
|
my $sendstatus=''; |
if ($ENV{'form.send'}) { |
if ($ENV{'form.send'}) { |
my %content=(); |
my %content=(); |
undef %content; |
undef %content; |
Line 1160 $content{'sendername'},$content{'senderd
|
Line 1167 $content{'sendername'},$content{'senderd
|
if ($toaddr{$_}) { $msgtxt.='<hr>'.$toaddr{$_}; } |
if ($toaddr{$_}) { $msgtxt.='<hr>'.$toaddr{$_}; } |
if ((($ENV{'form.critmsg'}) || ($ENV{'form.sendbck'})) && |
if ((($ENV{'form.critmsg'}) || ($ENV{'form.sendbck'})) && |
(&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))) { |
(&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))) { |
$r->print('Sending critical: '. |
$r->print(&mt('Sending critical message').' ...'); |
&user_crit_msg($recuname,$recdomain, |
$sendstatus.=' '.&user_crit_msg($recuname,$recdomain, |
&Apache::lonfeedback::clear_out_html($ENV{'form.subject'}), |
&Apache::lonfeedback::clear_out_html($ENV{'form.subject'}), |
$msgtxt, |
$msgtxt, |
$ENV{'form.sendbck'})); |
$ENV{'form.sendbck'}); |
} else { |
} else { |
$r->print('Sending: '.&user_normal_msg($recuname,$recdomain, |
$r->print(&mt('Sending').' ...'); |
&Apache::lonfeedback::clear_out_html($ENV{'form.subject'}), |
$sendstatus.=' '.&user_normal_msg($recuname,$recdomain, |
|
&Apache::lonfeedback::clear_out_html($ENV{'form.subject'}), |
$msgtxt, |
$msgtxt, |
$content{'citation'})); |
$content{'citation'}); |
} |
} |
$r->print('<br />'); |
$r->print('<br />'); |
} |
} |
} |
} |
if ($ENV{'form.displayedcrit'}) { |
if ($sendstatus=~/^(\s*(?:ok|con_delayed)\s*)*$/) { |
&discrit($r); |
if ($ENV{'form.displayedcrit'}) { |
|
&discrit($r); |
|
} else { |
|
&disall($r); |
|
} |
} else { |
} else { |
&disall($r); |
$r->print( |
|
'<h2><font color="red">'.&mt('Could not deliver message').'</font></h2>'. |
|
&mt('Please use the browser "Back" button and correct the recipient addresses') |
|
); |
} |
} |
} else { |
} else { |
&disall($r); |
&disall($r); |