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

matthew lon-capa-cvs@mail.lon-capa.org
Wed, 17 Mar 2004 16:28:23 -0000


matthew		Wed Mar 17 11:28:23 2004 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  Output a maximum of 10 bombs per resource.
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.253 loncom/interface/lonnavmaps.pm:1.254
--- loncom/interface/lonnavmaps.pm:1.253	Tue Mar  9 16:26:59 2004
+++ loncom/interface/lonnavmaps.pm	Wed Mar 17 11:28:23 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.253 2004/03/09 21:26:59 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.254 2004/03/17 16:28:23 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1011,8 +1011,11 @@
     
     if ($resource->getErrors()) {
         my $errors = $resource->getErrors();
+        my $errorcount = 0;
         foreach (split(/,/, $errors)) {
+            last if ($errorcount>=10); # Only output 10 bombs maximum
             if ($_) {
+                $errorcount++;
                 $errorHTML .= '&nbsp;<a href="/adm/email?display='
                     . &Apache::lonnet::escape($_) . '">'
                     . '<img src="/adm/lonMisc/bomb.gif" '