Diff for /loncom/interface/lonwhatsnew.pm between versions 1.65 and 1.66

version 1.65, 2006/11/23 00:15:56 version 1.66, 2006/12/03 05:45:13
Line 740  sub getitems { Line 740  sub getitems {
         %{$$ungraded{$symb}} = ();          %{$$ungraded{$symb}} = ();
         %{$$triggered{$symb}} = ();          %{$$triggered{$symb}} = ();
         $$triggered{$symb}{numparts} = 0;          $$triggered{$symb}{numparts} = 0;
           if ($resource->encrypted()) {
               $$triggered{$symb}{'enclink'} = $resource->link();
               $$triggered{$symb}{'encsymb'} = $resource->shown_symb();
           }
         my $title = $resource->compTitle();          my $title = $resource->compTitle();
         $$res_title{$symb} = $title;          $$res_title{$symb} = $title;
         my $ressymb = $resource->wrap_symb();          my $ressymb = $resource->wrap_symb();
Line 781  sub check_discussions { Line 785  sub check_discussions {
     %{$$unread{$ressymb}} = ();      %{$$unread{$ressymb}} = ();
     $$unread{$ressymb}{'title'} = $title;      $$unread{$ressymb}{'title'} = $title;
     $$unread{$ressymb}{'symb'} = $symb;      $$unread{$ressymb}{'symb'} = $symb;
       if ($resource->encrypted()) {
           $$unread{$ressymb}{'enclink'} = $resource->link();
           $$unread{$ressymb}{'encsymb'} = $resource->shown_symb();
       }
     push(@{$newdiscussions}, $ressymb);      push(@{$newdiscussions}, $ressymb);
           
     $$unread{$ressymb}{'lastpost'} = $resource->last_post_time();      $$unread{$ressymb}{'lastpost'} = $resource->last_post_time();
Line 807  sub check_handgraded { Line 815  sub check_handgraded {
             if (@ungraded > 0) {              if (@ungraded > 0) {
                 $$ungraded{$symb}{count} = scalar(@ungraded);                  $$ungraded{$symb}{count} = scalar(@ungraded);
                 $$ungraded{$symb}{title} = $title;                  $$ungraded{$symb}{title} = $title;
                 push(@{$tograde}, $symb);                  if ($resource->encrypted()) {
                       $$ungraded{$symb}{'enclink'} = $resource->link();
                       $$ungraded{$symb}{'encsymb'} = $resource->shown_symb();
                   }
                   push(@{$tograde},$symb);
             }              }
         }          }
     }      }
Line 1145  sub display_handgrade { Line 1157  sub display_handgrade {
             my ($map,$id,$url)=&Apache::lonnet::decode_symb($res);              my ($map,$id,$url)=&Apache::lonnet::decode_symb($res);
             my $linkurl=&Apache::lonnet::clutter($url);              my $linkurl=&Apache::lonnet::clutter($url);
             $linkurl .= '?symb='.&escape($res);              $linkurl .= '?symb='.&escape($res);
                                                                                              if ($$ungraded{$res}{'enclink'}) {
                   $linkurl = 
                       $$ungraded{$res}{'enclink'}.'?symb='.$$ungraded{$res}{'encsymb'};
               } 
             $r->print('<tr bgcolor="'.$rowColor.'"><td><a href="'.$linkurl.'"><small>'.$$ungraded{$res}{title}.'</small></a></td><td align="right"><small>'.$$ungraded{$res}{count}.'</small></td></tr>');              $r->print('<tr bgcolor="'.$rowColor.'"><td><a href="'.$linkurl.'"><small>'.$$ungraded{$res}{title}.'</small></a></td><td align="right"><small>'.$$ungraded{$res}{count}.'</small></td></tr>');
             $rowNum ++;              $rowNum ++;
         }          }
Line 1215  sub display_abovethreshold { Line 1230  sub display_abovethreshold {
                 $rowspan = 'rowspan="'.$$triggered{$res}{numparts}.'"';                  $rowspan = 'rowspan="'.$$triggered{$res}{numparts}.'"';
             }              }
             $linkurl .= '?symb='.&escape($res);              $linkurl .= '?symb='.&escape($res);
               if ($$triggered{$res}{'enclink'}) {
                   $linkurl = 
                     $$triggered{$res}{'enclink'}.'?symb='.$$triggered{$res}{'encsymb'};
               }
             my $css_class = $row%2?'LC_odd_row':'';              my $css_class = $row%2?'LC_odd_row':'';
             $r->print('<tr class="'.$css_class.'">'.              $r->print('<tr class="'.$css_class.'">'.
       '<td class="LC_first_item" '.$rowspan.'><a href="'.$linkurl.'">'.        '<td class="LC_first_item" '.$rowspan.'><a href="'.$linkurl.'">'.
Line 1305  sub display_coursediscussion { Line 1324  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='.$$unread{$ressymb}{symb};
             if ($feedurl =~ /bulletinboard/) {              if ($feedurl =~ /bulletinboard/) {
                 $type = 'Bulletin Board';                  $type = 'Bulletin Board';
             }              }
               if ($$unread{$ressymb}{'enclink'}) {
                   $disclink = $$unread{$ressymb}{'enclink'}.'?symb='.$$unread{$ressymb}{'encsymb'};
               }
             if ($rowNum %2 == 1) {              if ($rowNum %2 == 1) {
                 $rowColor = $rowColor1;                  $rowColor = $rowColor1;
             } else {              } else {
Line 1315  sub display_coursediscussion { Line 1338  sub display_coursediscussion {
             }              }
             my $lastpost = &Apache::lonnavmaps::timeToHumanString(              my $lastpost = &Apache::lonnavmaps::timeToHumanString(
                                                $$unread{$ressymb}{'lastpost'});                                                 $$unread{$ressymb}{'lastpost'});
             $r->print('<tr bgcolor="'.$rowColor.'"><td><small><a href="'.$feedurl.'?symb='.$$unread{$ressymb}{symb}.'">'.$forum_title.'</a>&nbsp;</td><td><small>'.$type.'&nbsp;</small></td>');              $r->print('<tr bgcolor="'.$rowColor.'"><td><small><a href="'.$disclink.'">'.$forum_title.'</a>&nbsp;</td><td><small>'.$type.'&nbsp;</small></td>');
             if ($countunread eq 'on') {              if ($countunread eq 'on') {
                 my $unreadnum = $$unread{$ressymb}{'unreadcount'};                  my $unreadnum = $$unread{$ressymb}{'unreadcount'};
                 $r->print('<td><small>'.$lastpost.'<small></td><td align="right">'.                  $r->print('<td><small>'.$lastpost.'<small></td><td align="right">'.

Removed from v.1.65  
changed lines
  Added in v.1.66


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