--- loncom/interface/lonnotify.pm 2006/03/23 22:32:10 1.15 +++ 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) = @_; @@ -104,12 +106,12 @@ sub start_page { } } - $loadcode = ' onLoad="'.$loadcode.'" '; my $start_page = &Apache::loncommon::start_page('Broadcast e-mail to users', $jscript, - {'add_entries' => $loadcode,}); + {'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 .= '