version 1.186, 2006/11/01 22:22:31
|
version 1.188, 2006/12/06 17:14:50
|
Line 33 use Apache::lonnet;
|
Line 33 use Apache::lonnet;
|
use HTML::TokeParser(); |
use HTML::TokeParser(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Mail::Send; |
use Mail::Send; |
use lib '/home/httpd/lib/perl/'; |
use LONCAPA qw(:DEFAULT :match); |
use LONCAPA; |
|
|
|
{ |
{ |
my $uniq; |
my $uniq; |
Line 224 sub sendemail {
|
Line 223 sub sendemail {
|
my $msg = new Mail::Send; |
my $msg = new Mail::Send; |
$msg->to($to); |
$msg->to($to); |
$msg->subject('[LON-CAPA] '.$subject); |
$msg->subject('[LON-CAPA] '.$subject); |
if ($senderaddress) { $msg->add('Reply-to',$senderaddress); } |
if ($senderaddress) { $msg->add('Reply-to',$senderaddress); $msg->add('From',$senderaddress); } |
if (my $fh = $msg->open()) { |
if (my $fh = $msg->open()) { |
print $fh $body; |
print $fh $body; |
$fh->close; |
$fh->close; |
Line 308 sub author_res_msg {
|
Line 307 sub author_res_msg {
|
sub retrieve_author_res_msg { |
sub retrieve_author_res_msg { |
my $url=shift; |
my $url=shift; |
$url=&Apache::lonnet::declutter($url); |
$url=&Apache::lonnet::declutter($url); |
my ($domain,$author)=($url=~/^(\w+)\/(\w+)\//); |
my ($domain,$author)=($url=~/^($match_domain)\/($match_username)\//); |
my %errormsgs=&Apache::lonnet::dump('nohist_res_msgs',$domain,$author); |
my %errormsgs=&Apache::lonnet::dump('nohist_res_msgs',$domain,$author); |
my $msgs=''; |
my $msgs=''; |
foreach (keys %errormsgs) { |
foreach (keys %errormsgs) { |
Line 328 sub retrieve_author_res_msg {
|
Line 327 sub retrieve_author_res_msg {
|
sub del_url_author_res_msg { |
sub del_url_author_res_msg { |
my $url=shift; |
my $url=shift; |
$url=&Apache::lonnet::declutter($url); |
$url=&Apache::lonnet::declutter($url); |
my ($domain,$author)=($url=~/^(\w+)\/(\w+)\//); |
my ($domain,$author)=($url=~/^($match_domain)\/($match_username)\//); |
my @delmsgs=(); |
my @delmsgs=(); |
foreach (&Apache::lonnet::getkeys('nohist_res_msgs',$domain,$author)) { |
foreach (&Apache::lonnet::getkeys('nohist_res_msgs',$domain,$author)) { |
if ($_=~/^\Q$url\E\_\d+$/) { |
if ($_=~/^\Q$url\E\_\d+$/) { |
Line 342 sub del_url_author_res_msg {
|
Line 341 sub del_url_author_res_msg {
|
sub clear_author_res_msg { |
sub clear_author_res_msg { |
my $url=shift; |
my $url=shift; |
$url=&Apache::lonnet::declutter($url); |
$url=&Apache::lonnet::declutter($url); |
my ($domain,$author)=($url=~/^(\w+)\/(\w+)\//); |
my ($domain,$author)=($url=~/^($match_domain)\/($match_username)\//); |
my @delmsgs=(); |
my @delmsgs=(); |
foreach (&Apache::lonnet::getkeys('nohist_res_msgs',$domain,$author)) { |
foreach (&Apache::lonnet::getkeys('nohist_res_msgs',$domain,$author)) { |
if ($_=~/^\Q$url\E/) { |
if ($_=~/^\Q$url\E/) { |