Diff for /loncom/interface/lonnotify.pm between versions 1.37 and 1.41

version 1.37, 2010/07/09 14:40:20 version 1.41, 2014/12/11 13:15:35
Line 220  sub print_display_option_form { Line 220  sub print_display_option_form {
     $output .= &Apache::lonhtmlcommon::row_title(&mt('Choose sender(s)'));      $output .= &Apache::lonhtmlcommon::row_title(&mt('Choose sender(s)'));
     my %personnel = &Apache::lonnet::get_domain_roles($cdom,\@roles);      my %personnel = &Apache::lonnet::get_domain_roles($cdom,\@roles);
     my @domcc = ();      my @domcc = ();
     foreach my $server (keys %personnel) {      foreach my $server (keys(%personnel)) {
         foreach my $user (sort(keys %{$personnel{$server}})) {          foreach my $user (sort(keys(%{$personnel{$server}}))) {
             my ($trole,$uname,$udom,$runame,$rudom,$rsec) = split(/:/,$user);              my ($trole,$uname,$udom,$runame,$rudom,$rsec) = split(/:/,$user);
             unless (grep/^$uname:$udom$/,@domcc) {              unless (grep/^$uname:$udom$/,@domcc) {
                 my %userinfo = &Apache::lonnet::get('environment',['lastname','firstname'],$udom,$uname);                  my %userinfo = &Apache::lonnet::get('environment',['lastname','firstname'],$udom,$uname);
Line 286  ENDSCRIPT Line 286  ENDSCRIPT
     $output .= &Apache::loncommon::start_data_table();      $output .= &Apache::loncommon::start_data_table();
     if ($msgcount > 0) {      if ($msgcount > 0) {
         $output .= &Apache::loncommon::start_data_table_header_row().          $output .= &Apache::loncommon::start_data_table_header_row().
     '<th><a href="javascript:changeSort(\'date\')">Date</a></th>'.      '<th><a href="javascript:changeSort(\'date\')">'.&mt('Date').'</a></th>'.
     '<th><a href="javascript:changeSort(\'subject\')">Subject</a></th>'.      '<th><a href="javascript:changeSort(\'subject\')">'.&mt('Subject').'</a></th>'.
     '<th><a href="javascript:changeSort(\'sender\')">Sender</a></th>'.      '<th><a href="javascript:changeSort(\'sender\')">'.&mt('Sender').'</a></th>'.
     '<th><a href="javascript:changeSort(\'message\')">Message</a></th>'.      '<th><a href="javascript:changeSort(\'message\')">'.&mt('Message').'</a></th>'.
     '<th><a href="javascript:changeSort(\'recipients\')">Recipients</a></th>'.      '<th><a href="javascript:changeSort(\'recipients\')">'.&mt('Recipients').'</a></th>'.
     &Apache::loncommon::end_data_table_header_row();      &Apache::loncommon::end_data_table_header_row();
   
         if (($env{'form.sortby'} eq 'date') || ($env{'form.sortby'} eq '') || (!defined($env{'form.sortby'})) || (($env{'form.sortby'} eq 'sender') && (@senders <= 1))) {          if (($env{'form.sortby'} eq 'date') || ($env{'form.sortby'} eq '') || (!defined($env{'form.sortby'})) || (($env{'form.sortby'} eq 'sender') && (@senders <= 1))) {
Line 357  ENDSCRIPT Line 357  ENDSCRIPT
         }          }
     } else {      } else {
         $output .= &Apache::loncommon::start_data_table_empty_row().          $output .= &Apache::loncommon::start_data_table_empty_row().
     '<td>No mail sent matching supplied criteria</td>'.      '<td>'.&mt('No mail sent matching supplied criteria').'</td>'.
     &Apache::loncommon::end_data_table_empty_row();      &Apache::loncommon::end_data_table_empty_row();
     }      }
     $output .= &Apache::loncommon::end_data_table();      $output .= &Apache::loncommon::end_data_table();
Line 645  function goBack(target) { Line 645  function goBack(target) {
         $output .= &Apache::loncommon::end_data_table();          $output .= &Apache::loncommon::end_data_table();
         if (@unmatched) {          if (@unmatched) {
             $output .= '<br /><br />'.&mt('Could not determine e-mail addresses for the following users:').'<ul>';              $output .= '<br /><br />'.&mt('Could not determine e-mail addresses for the following users:').'<ul>';
             foreach my $username (sort @unmatched) {              foreach my $username (sort(@unmatched)) {
                 $output .= '<li>'.$username.'</li>';                  $output .= '<li>'.$username.'</li>';
             }              }
             $output .= '</ul>';              $output .= '</ul>';
Line 705  ENDSCRIPT Line 705  ENDSCRIPT
     '<th>'.&mt('Status').'</th>'.      '<th>'.&mt('Status').'</th>'.
     '<th>'.&mt('Subject').'</th>'.      '<th>'.&mt('Subject').'</th>'.
     '<th>'.&mt('Message').'</th>'.      '<th>'.&mt('Message').'</th>'.
     '<th>'.&mt('Recipents').'</th>'.      '<th>'.&mt('Recipients').'</th>'.
     &Apache::loncommon::end_data_table_header_row();      &Apache::loncommon::end_data_table_header_row();
  $output .= &Apache::loncommon::start_data_table_row().   $output .= &Apache::loncommon::start_data_table_row().
     '<td valign="middle">'.&mt('Sent').'</td>'.      '<td valign="middle">'.&mt('Sent').'</td>'.
Line 720  ENDSCRIPT Line 720  ENDSCRIPT
     &Apache::loncommon::end_data_table_row().      &Apache::loncommon::end_data_table_row().
     &Apache::loncommon::end_data_table();      &Apache::loncommon::end_data_table();
     } else {      } else {
         $output .= 'No mail sent - no recipients identified';           $output .= &mt('No mail sent - no recipients identified'); 
     }      }
     $output .= '<br /><a href="/adm/notify">'.&mt('Send another e-mail').'</a>'."\n";      $output .= '<br /><a href="/adm/notify">'.&mt('Send another e-mail').'</a>'."\n";
     $output .= '<input type="hidden" name="command" />'."\n".      $output .= '<input type="hidden" name="command" />'."\n".
Line 742  sub broadcast_email { Line 742  sub broadcast_email {
         $msg->to($to);          $msg->to($to);
         $msg->subject($subject);          $msg->subject($subject);
         $msg->add('From',"$from");          $msg->add('From',"$from");
           $msg->add('Content-type','text/plain; charset=UTF-8');
         if (my $fh = $msg->open()) {          if (my $fh = $msg->open()) {
             print $fh $message;              print $fh $message;
             $fh->close;              $fh->close;

Removed from v.1.37  
changed lines
  Added in v.1.41


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>