Diff for /loncom/interface/lonwhatsnew.pm between versions 1.105.2.14 and 1.125

version 1.105.2.14, 2017/05/19 19:55:09 version 1.125, 2017/09/13 23:35:07
Line 80  sub handler { Line 80  sub handler {
     }      }
     unless ($isadhoc) {      unless ($isadhoc) {
         %checkallowed = ( coursenormalmail => 1,          %checkallowed = ( coursenormalmail => 1,
                           coursecritmail => 1,);    coursecritmail => 1,);
     }      }
     foreach my $perm_check (['whn','whatsnew',1],      foreach my $perm_check (['whn','whatsnew',1],
     ['pch','coursediscussion',1],      ['pch','coursediscussion',1],
Line 670  sub display_actions_box { Line 670  sub display_actions_box {
 #    my $halfway = int($totalboxes/2) + $totalboxes%2;  #    my $halfway = int($totalboxes/2) + $totalboxes%2;
     foreach my $actionitem (@actionorder) {      foreach my $actionitem (@actionorder) {
         if ($checkallowed->{$actionitem}) {          if ($checkallowed->{$actionitem}) {
             if (($actioncolumn{$actionitem} eq 'right') && ($currcolumn eq 'left')) {               if (($actioncolumn{$actionitem} eq 'right') && ($currcolumn eq 'left')) {
                 $r->print('</td><td>&nbsp;</td><td class="LC_right_col" >');                  $r->print('</td><td>&nbsp;</td><td class="LC_right_col" >');
                 $currcolumn = 'right';                   $currcolumn = 'right'; 
             }              }
Line 1325  sub getnormalmail { Line 1325  sub getnormalmail {
             if ($emailstatus{$msgid} eq 'new') {              if ($emailstatus{$msgid} eq 'new') {
                 $skipstatus = 1;                  $skipstatus = 1;
             }              }
               my $esc_msgid = &escape($msgid);
             my ($sendtime,$shortsubj,$fromname,$fromdom,$status,$fromcid)=              my ($sendtime,$shortsubj,$fromname,$fromdom,$status,$fromcid)=
                 &Apache::lonmsg::unpackmsgid($msgid,undef,$skipstatus,undef,                  &Apache::lonmsg::unpackmsgid($esc_msgid,undef,$skipstatus,undef,
                                              $env{'request.course.id'});                                               $env{'request.course.id'});
             if (($fromcid) && ($fromcid eq $env{'request.course.id'})) {              if (($fromcid) && ($fromcid eq $env{'request.course.id'})) {
                 if (defined($sendtime) && $sendtime!~/error/) {                  if (defined($sendtime) && $sendtime!~/error/) {
                     if (($emailstatus{$msgid} eq 'new') || ($status eq 'new')) {                      if (($emailstatus{$msgid} eq 'new') || ($status eq 'new')) {
                         $sendtime = &Apache::lonlocal::locallocaltime($sendtime);                          $sendtime = &Apache::lonlocal::locallocaltime($sendtime);
                         $msgcount ++;          $msgcount ++;
                         if ($shortsubj eq '') {                          if ($shortsubj eq '') {
                             $shortsubj = &mt('No subject');                              $shortsubj = &mt('No subject');
                         }                          }
                         push(@{$newmsgs}, {                          push(@{$newmsgs}, {
                             msgid    => $msgid,                              msgid    => $esc_msgid,
                             sendtime => $sendtime,                              sendtime => $sendtime,
                             shortsub => $shortsubj,                              shortsub => $shortsubj,
                             from     => $fromname,                              from     => $fromname,
Line 1358  sub getcritmail { Line 1359  sub getcritmail {
     my $result = '';      my $result = '';
     my $critmsgcount = 0;      my $critmsgcount = 0;
     foreach my $msgid (sort(keys(%what))) {      foreach my $msgid (sort(keys(%what))) {
           my $esc_msgid = &escape($msgid);
         my ($sendtime,$shortsubj,$fromname,$fromdom,$status,$fromcid)=          my ($sendtime,$shortsubj,$fromname,$fromdom,$status,$fromcid)=
             &Apache::lonmsg::unpackmsgid($msgid,undef,1,undef,              &Apache::lonmsg::unpackmsgid($esc_msgid,undef,1,undef,
                                          $env{'request.course.id'});                                           $env{'request.course.id'});
         if (($fromcid) && ($fromcid eq  $env{'request.course.id'})) {          if (($fromcid) && ($fromcid eq  $env{'request.course.id'})) {
             if (defined($sendtime) && $sendtime!~/error/) {              if (defined($sendtime) && $sendtime!~/error/) {
Line 1369  sub getcritmail { Line 1371  sub getcritmail {
                     $shortsubj = &mt('No subject');                      $shortsubj = &mt('No subject');
                 }                  }
                 push(@{$critmsgs}, {                  push(@{$critmsgs}, {
                         msgid    => $msgid,                          msgid    => $esc_msgid,
                         sendtime => $sendtime,                          sendtime => $sendtime,
                         shortsub => $shortsubj,                          shortsub => $shortsubj,
                         from     => $fromname,                          from     => $fromname,
Line 1669  sub display_handgrade { Line 1671  sub display_handgrade {
         foreach my $res (@{$tograde}) {          foreach my $res (@{$tograde}) {
             $rowNum ++;              $rowNum ++;
             my $css_class = $rowNum%2?' class="LC_odd_row"':'';              my $css_class = $rowNum%2?' class="LC_odd_row"':'';
             my ($map,$id,$url)=&Apache::lonnet::decode_symb($res);              my $linkurl='/adm/grades';
             my $linkurl=&Apache::lonnet::clutter($url);  
             $linkurl .= '?symb='.&escape($res);  
             if ($$ungraded{$res}{'enclink'}) {              if ($$ungraded{$res}{'enclink'}) {
                 $linkurl =                  $linkurl.='?symb='.$$ungraded{$res}{'encsymb'};
                     $$ungraded{$res}{'enclink'}.'?symb='.$$ungraded{$res}{'encsymb'};              } else {
                   $linkurl.='?symb='.&escape($res);
             }              }
               $linkurl.='&amp;command=ungraded';
             $r->print('<tr'.$css_class.'><td><a href="'.$linkurl.'">'.$$ungraded{$res}{title}.'</a></td><td class="LC_right_item">'.$$ungraded{$res}{count}.'</td></tr>');              $r->print('<tr'.$css_class.'><td><a href="'.$linkurl.'">'.$$ungraded{$res}{title}.'</a></td><td class="LC_right_item">'.$$ungraded{$res}{count}.'</td></tr>');
         }          }
     } elsif ($itemserror) {      } elsif ($itemserror) {
Line 2002  sub display_coursediscussion { Line 2004  sub display_coursediscussion {
             my $forum_title = $$unread{$ressymb}{'title'};              my $forum_title = $$unread{$ressymb}{'title'};
             my $type = 'Resource';              my $type = 'Resource';
             my $feedurl=&Apache::lonfeedback::get_feedurl($ressymb);              my $feedurl=&Apache::lonfeedback::get_feedurl($ressymb);
             my $disclink = $feedurl.'?symb='.&escape($$unread{$ressymb}{symb});              my $disclink = $feedurl.'?symb='. &escape($$unread{$ressymb}{symb});
             if ($feedurl =~ /bulletinboard/) {              if ($feedurl =~ /bulletinboard/) {
                 $type = 'Discussion Board';                  $type = 'Discussion Board';
             }              }

Removed from v.1.105.2.14  
changed lines
  Added in v.1.125


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