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

bowersj2 lon-capa-cvs@mail.lon-capa.org
Mon, 02 Sep 2002 18:25:55 -0000


bowersj2		Mon Sep  2 14:25:55 2002 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  Patches bug 176 by changing not-yet-open color to a cool blue, rather then
  bright red. Still want to see if I can capture network failure states and
  directly handle those correctly. Added a couple of comments to the code as I 
  understand it.
  
  Marked potential bug/useless line: I'm pretty sure 
  
  $rid=~/(\d+)\.(\d+)$/;
  
  can never do anything useful. Debugger shows nothing happens to $rid when this
  line executes. I think this tries to assign a two-element list to $rid, which
  can't happen.
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.44 loncom/interface/lonnavmaps.pm:1.45
--- loncom/interface/lonnavmaps.pm:1.44	Sun Sep  1 15:29:00 2002
+++ loncom/interface/lonnavmaps.pm	Mon Sep  2 14:25:55 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.44 2002/09/01 19:29:00 www Exp $
+# $Id: lonnavmaps.pm,v 1.45 2002/09/02 18:25:55 bowersj2 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -607,10 +607,14 @@
 		    $r->print("\n<tr>");
 		    my @colcont=split(/\&/,$rows[$i]);
 		    my $avespan=$lcm/($#colcont+1);
+
+		    # for each item I wish to print on this row...
 		    for ($j=0;$j<=$#colcont;$j++) {
 			my $indent;my $indentstr;
 			my $linkid;
 			my $rid=$colcont[$j];
+
+			# bug? $rid can't accept a list of two elements
                         $rid=~/(\d+)\.(\d+)$/;
 			my $src=
 			   &Apache::lonnet::declutter($hash{'src_'.$1.'.'.$2});
@@ -648,7 +652,7 @@
 			    } elsif ($code eq '4') {
 				$add='<td bgcolor="#E0FFAA">';
 			    } else {
-				$add='<td bgcolor="#FFAAAA">';
+				$add='<td bgcolor="#CCCCFF">';
 				if ($tcode eq '2') {
 				    $add='<td bgcolor="#FFFFAA">';
 				}