--- loncom/interface/lonwhatsnew.pm 2006/11/23 00:15:56 1.65 +++ loncom/interface/lonwhatsnew.pm 2006/12/03 05:45:13 1.66 @@ -1,5 +1,5 @@ # -# $Id: lonwhatsnew.pm,v 1.65 2006/11/23 00:15:56 banghart Exp $ +# $Id: lonwhatsnew.pm,v 1.66 2006/12/03 05:45:13 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -740,6 +740,10 @@ sub getitems { %{$$ungraded{$symb}} = (); %{$$triggered{$symb}} = (); $$triggered{$symb}{numparts} = 0; + if ($resource->encrypted()) { + $$triggered{$symb}{'enclink'} = $resource->link(); + $$triggered{$symb}{'encsymb'} = $resource->shown_symb(); + } my $title = $resource->compTitle(); $$res_title{$symb} = $title; my $ressymb = $resource->wrap_symb(); @@ -781,6 +785,10 @@ sub check_discussions { %{$$unread{$ressymb}} = (); $$unread{$ressymb}{'title'} = $title; $$unread{$ressymb}{'symb'} = $symb; + if ($resource->encrypted()) { + $$unread{$ressymb}{'enclink'} = $resource->link(); + $$unread{$ressymb}{'encsymb'} = $resource->shown_symb(); + } push(@{$newdiscussions}, $ressymb); $$unread{$ressymb}{'lastpost'} = $resource->last_post_time(); @@ -807,7 +815,11 @@ sub check_handgraded { if (@ungraded > 0) { $$ungraded{$symb}{count} = scalar(@ungraded); $$ungraded{$symb}{title} = $title; - push(@{$tograde}, $symb); + if ($resource->encrypted()) { + $$ungraded{$symb}{'enclink'} = $resource->link(); + $$ungraded{$symb}{'encsymb'} = $resource->shown_symb(); + } + push(@{$tograde},$symb); } } } @@ -1145,7 +1157,10 @@ sub display_handgrade { my ($map,$id,$url)=&Apache::lonnet::decode_symb($res); my $linkurl=&Apache::lonnet::clutter($url); $linkurl .= '?symb='.&escape($res); - + if ($$ungraded{$res}{'enclink'}) { + $linkurl = + $$ungraded{$res}{'enclink'}.'?symb='.$$ungraded{$res}{'encsymb'}; + } $r->print(''.$$ungraded{$res}{title}.''.$$ungraded{$res}{count}.''); $rowNum ++; } @@ -1215,6 +1230,10 @@ sub display_abovethreshold { $rowspan = 'rowspan="'.$$triggered{$res}{numparts}.'"'; } $linkurl .= '?symb='.&escape($res); + if ($$triggered{$res}{'enclink'}) { + $linkurl = + $$triggered{$res}{'enclink'}.'?symb='.$$triggered{$res}{'encsymb'}; + } my $css_class = $row%2?'LC_odd_row':''; $r->print(''. ''. @@ -1305,9 +1324,13 @@ sub display_coursediscussion { my $forum_title = $$unread{$ressymb}{'title'}; my $type = 'Resource'; my $feedurl=&Apache::lonfeedback::get_feedurl($ressymb); + my $disclink = $feedurl.'?symb='.$$unread{$ressymb}{symb}; if ($feedurl =~ /bulletinboard/) { $type = 'Bulletin Board'; } + if ($$unread{$ressymb}{'enclink'}) { + $disclink = $$unread{$ressymb}{'enclink'}.'?symb='.$$unread{$ressymb}{'encsymb'}; + } if ($rowNum %2 == 1) { $rowColor = $rowColor1; } else { @@ -1315,7 +1338,7 @@ sub display_coursediscussion { } my $lastpost = &Apache::lonnavmaps::timeToHumanString( $$unread{$ressymb}{'lastpost'}); - $r->print(''.$forum_title.' '.$type.' '); + $r->print(''.$forum_title.' '.$type.' '); if ($countunread eq 'on') { my $unreadnum = $$unread{$ressymb}{'unreadcount'}; $r->print(''.$lastpost.''.