Diff for /loncom/interface/lonmsgdisplay.pm between versions 1.173 and 1.175

version 1.173, 2014/01/16 18:38:25 version 1.175, 2014/05/21 17:36:58
Line 813  sub discrit { Line 813  sub discrit {
                 .'<input type="hidden" name="confirm" value="true" />';                  .'<input type="hidden" name="confirm" value="true" />';
     my %what=&Apache::lonnet::dump('critical');      my %what=&Apache::lonnet::dump('critical');
     my $result = '';      my $result = '';
     foreach my $key (sort(keys(%what))) {      # Sort by date in descending order
       foreach my $key (sort{$b <=> $a}(keys(%what))) {    
           print STDERR "key = ||$key||\n";
         my %content=&Apache::lonmsg::unpackagemsg($what{$key});          my %content=&Apache::lonmsg::unpackagemsg($what{$key});
         next if ($content{'senderdomain'} eq '');          next if ($content{'senderdomain'} eq '');
         my $description;          my $description;
Line 1023  sub disall { Line 1025  sub disall {
     &Apache::loncommon::store_settings('user','mail',\%saveable);      &Apache::loncommon::store_settings('user','mail',\%saveable);
     &Apache::loncommon::restore_settings('user','mail',\%saveable);      &Apache::loncommon::restore_settings('user','mail',\%saveable);
     $folder    ||= $env{'form.folder'};      $folder    ||= $env{'form.folder'};
       # Always show critical messages if present
       my @what=&Apache::lonnet::dump('critical',$env{'user.domain'},$env{'user.name'});
       if ($what[0]) {
    if (($what[0] ne 'con_lost') && ($what[0]!~/^error\:/)) {
               $folder = 'critical';
           }
       }
     $msgstatus ||= $env{'form.msgstatus'};      $msgstatus ||= $env{'form.msgstatus'};
     $env{'form.interdis'} ||= 20;      $env{'form.interdis'} ||= 20;
   
Line 1953  $content{'sendername'}.':'. Line 1962  $content{'sendername'}.':'.
     if ($result eq '') {      if ($result eq '') {
         my $lctype = &mt(lc(&Apache::loncommon::course_type()));          my $lctype = &mt(lc(&Apache::loncommon::course_type()));
  if ($target ne 'tex') {    if ($target ne 'tex') { 
     $r->print("<p><b>".&mt('No notes, face-to-face discussion records, critical messages, or broadcast messages in this [_1].',$lctype)."</b></p>");      $r->print("<p><b>".&mt('No notes, face-to-face discussion records, critical messages or broadcast messages in this '.$lctype.'.')."</b></p>");
  } else {   } else {
     $r->print('\textbf{'.&mt('No notes, face-to-face discussion records, critical messages or broadcast messages in this [_1].',$lctype).'}\\\\');      $r->print('\textbf{'.&mt('No notes, face-to-face discussion records, critical messages or broadcast messages in this '.$lctype.'.').'}\\\\');
  }   }
     } elsif ($target ne 'tex') {      } elsif ($target ne 'tex') {
        $r->print($result.'</div>');         $r->print($result.'</div>');

Removed from v.1.173  
changed lines
  Added in v.1.175


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