[LON-CAPA-cvs] cvs: loncom /interface lonwhatsnew.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Thu, 15 Dec 2005 13:38:58 -0000


raeburn		Thu Dec 15 08:38:58 2005 EDT

  Modified files:              
    /loncom/interface	lonwhatsnew.pm 
  Log:
  Only loop through once.
  
  
Index: loncom/interface/lonwhatsnew.pm
diff -u loncom/interface/lonwhatsnew.pm:1.37 loncom/interface/lonwhatsnew.pm:1.38
--- loncom/interface/lonwhatsnew.pm:1.37	Wed Dec 14 19:53:29 2005
+++ loncom/interface/lonwhatsnew.pm	Thu Dec 15 08:38:58 2005
@@ -1,5 +1,5 @@
 #
-# $Id: lonwhatsnew.pm,v 1.37 2005/12/15 00:53:29 raeburn Exp $
+# $Id: lonwhatsnew.pm,v 1.38 2005/12/15 13:38:58 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -635,23 +635,14 @@
                     $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'};