--- loncom/interface/lonwhatsnew.pm 2005/12/15 00:53:29 1.37 +++ loncom/interface/lonwhatsnew.pm 2005/12/19 23:24:40 1.38.2.1 @@ -1,5 +1,5 @@ # -# $Id: lonwhatsnew.pm,v 1.37 2005/12/15 00:53:29 raeburn Exp $ +# $Id: lonwhatsnew.pm,v 1.38.2.1 2005/12/19 23:24:40 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -171,7 +171,10 @@ function change_display(caller,change) { function changeAll(change) { END foreach my $item (keys(%{$checkallowed})) { - $scripttag.='document.visible.display_'.$item.'.value=change'."\n"; + if ($$checkallowed{$item}) { + $scripttag.='document.visible.display_'.$item.'.value=change'. + "\n"; + } } $scripttag.='document.visible.submit(); } @@ -635,23 +638,14 @@ sub get_discussions { $hidden = $$discussiondata{$id.':'.$ressymb.':hidden'}; $hiddenflag = 1; } - } - if (grep/^deleted$/,@keys) { + } elsif (grep/^deleted$/,@keys) { unless ($deletedflag) { $deleted = $$discussiondata{$id.':'.$ressymb.':deleted'}; $deletedflag = 1; } - } - if ($deletedflag && $hiddenflag) { - last; - } - } - for (my $id=$version; $id>0; $id--) { - unless (($hidden =~/\.$id\./) || ($deleted =~/\.$id\./)) { - if ($prevread <$$discussiondata{$id.':'.$ressymb.':timestamp'}) { - unless((exists($$discussiondata{$id.':'.$ressymb.':hidden'})) || - (exists($$discussiondata{$id.':'.$ressymb.':deleted'}))) { - + } else { + unless (($hidden =~/\.$id\./) || ($deleted =~/\.$id\./)) { + if ($prevread <$$discussiondata{$id.':'.$ressymb.':timestamp'}) { $unreadcount ++; $$unread{$ressymb}{$unreadcount} = $id.': '. $$discussiondata{$id.':'.$ressymb.':subject'};