--- loncom/interface/lonnotify.pm 2006/04/10 21:40:08 1.16 +++ loncom/interface/lonnotify.pm 2006/05/30 12:46:09 1.19 @@ -34,6 +34,8 @@ use Apache::lonlocal; use Mail::Send; use HTML::TokeParser; use HTML::Entities; +use lib '/home/httpd/lib/perl/'; +use LONCAPA; sub handler { my ($r) = @_; @@ -109,7 +111,7 @@ sub start_page { {'add_entries' => {'onload' => $loadcode,},}); my $breadcrumbs = - &Apache::lonhtmlcommon::breadcrumbs(undef,$bread_title, + &Apache::lonhtmlcommon::breadcrumbs($bread_title, 'Broadcast_system_email'); my $output = <<"ENDONE"; $start_page @@ -294,9 +296,8 @@ ENDSCRIPT $rowColor = $rowColor2; } my $recipients = ''; - my ($date,$subj,$sname,$sdom) = + my ($date,undef,$sname,$sdom) = &Apache::lonmsg::unpackmsgid($msgid,undef,1); - $subj = &Apache::lonnet::escape($subj); $date = &Apache::lonlocal::locallocaltime($date); foreach my $user (sort(keys(%{$dcmail{$msgid}{recipient}}))) { $recipients .= $dcmail{$msgid}{recipient}{$user}.', '; @@ -307,9 +308,8 @@ ENDSCRIPT } } else { foreach my $msgid (sort(keys(%dcmail))) { - my ($date,$subj,$sname,$sdom) = + my ($date,undef,$sname,$sdom) = &Apache::lonmsg::unpackmsgid($msgid,undef,1); - $subj = &Apache::lonnet::escape($subj); if ($env{'form.sortby'} eq 'subject') { push @{$Sortby{$dcmail{$msgid}{subject}}},$msgid; } elsif ($env{'form.sortby'} eq 'message') { @@ -343,9 +343,8 @@ ENDSCRIPT } $recipients =~ s/,\s$//; } - my ($date,$subj,$sname,$sdom) = + my ($date,undef,$sname,$sdom) = &Apache::lonmsg::unpackmsgid($msgid,undef,1); - $subj = &Apache::lonnet::escape($subj); $date = &Apache::lonlocal::locallocaltime($date); $output .= ''.$date.''.&cr_to_br($dcmail{$msgid}{subject}).''.$sname.':'.$sdom.''.&cr_to_br($dcmail{$msgid}{message}).''.$recipients.''."\n"; $rowNum ++; @@ -627,7 +626,7 @@ function goBack(target) { } foreach my $username (sort(keys(%recipients))) { if ($recipients{$username} =~ /\@/) { - my $value=&Apache::lonnet::escape($username).':'.&Apache::lonnet::escape($recipients{$username}); + my $value=&escape($username).':'.&escape($recipients{$username}); $output .= ''.$username.'  '.$recipients{$username}.''; } } @@ -706,7 +705,7 @@ ENDSCRIPT '; foreach my $person (@deliveries) { my ($username,$email) = split(/:/,$person); - $output .= &Apache::lonnet::unescape($email).' ('.&Apache::lonnet::unescape($username).')
'."\n"; + $output .= &unescape($email).' ('.&unescape($username).')
'."\n"; } $output .= ' @@ -732,8 +731,8 @@ sub broadcast_email { foreach my $user (@{$recipients}) { my $msg = new Mail::Send; my ($username,$to) = split(/:/,$user); - $username = &Apache::lonnet::unescape($username); - $to = &Apache::lonnet::unescape($to); + $username = &unescape($username); + $to = &unescape($to); $msg->to($to); $msg->subject($subject); $msg->add('From',"$from");