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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Fri, 17 Aug 2007 22:12:32 -0000


albertel		Fri Aug 17 18:12:32 2007 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  - elide blank rows
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.222 loncom/interface/lonmenu.pm:1.223
--- loncom/interface/lonmenu.pm:1.222	Tue Jul 17 14:31:37 2007
+++ loncom/interface/lonmenu.pm	Fri Aug 17 18:12:30 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.222 2007/07/17 18:31:37 albertel Exp $
+# $Id: lonmenu.pm,v 1.223 2007/08/17 22:12:30 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -547,19 +547,24 @@
 ENDINLINEICONS
                         }
                     } else {
-			$inlinebuttons=(<<ENDFIRSTLINE);
+			if ($inlineremote[21] ne '' || $inlineremote[23] ne '') {
+			    $inlinebuttons=(<<ENDFIRSTLINE);
 <tr><td>$inlineremote[21]</td><td>&nbsp;</td><td>$inlineremote[23]</td></tr>
 ENDFIRSTLINE
-                        if (&hidden_button_check() ne 'yes') { 
-                            $inlinebuttons .= (<<ENDINLINE);
-<tr><td>$inlineremote[61]</td><td>$inlineremote[62]</td><td>$inlineremote[63]</td></tr>
-<tr><td>$inlineremote[71]</td><td>$inlineremote[72]</td><td>$inlineremote[73]</td></tr>
-<tr><td>$inlineremote[81]</td><td>$inlineremote[82]</td><td>$inlineremote[83]</td></tr>
-<tr><td>$inlineremote[91]</td><td>$inlineremote[92]</td><td>$inlineremote[93]</td></tr>
-ENDINLINE
                         }
-                    }
-                }
+                        if (&hidden_button_check() ne 'yes') { 
+			    foreach my $row (6..9) {
+				if ($inlineremote[${row}.'1'] ne ''
+				    || $inlineremote[$row.'2'] ne ''
+				    || $inlineremote[$row.'3'] ne '') {
+				    $inlinebuttons .= <<"ENDLINE";
+<tr><td>$inlineremote["${row}1"]</td><td>$inlineremote["${row}2"]</td><td>$inlineremote["${row}3"]</td></tr>
+ENDLINE
+				}
+			    }
+			}
+		    }
+		}
 	    }
 	    $result =(<<ENDREGTEXT);
 <script type="text/javascript">