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

bowersj2 lon-capa-cvs@mail.lon-capa.org
Tue, 10 Jun 2003 20:07:58 -0000


bowersj2		Tue Jun 10 16:07:58 2003 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  Should fix multipart problems with one part screwing up navmaps.
  
  I'm not convinced this is the best way to fix it, but I think it is at 
  least the least disruptive (fewest lines of code, no major 
  infrastructure changes), which has something to say for it.
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.197 loncom/interface/lonnavmaps.pm:1.198
--- loncom/interface/lonnavmaps.pm:1.197	Tue Jun 10 15:44:16 2003
+++ loncom/interface/lonnavmaps.pm	Tue Jun 10 16:07:58 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.197 2003/06/10 19:44:16 bowersj2 Exp $
+# $Id: lonnavmaps.pm,v 1.198 2003/06/10 20:07:58 bowersj2 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1415,8 +1415,13 @@
                         @parts = ($parts[0]);
                         $args->{'condensed'} = 1;
                     }
-                    
                 }
+		# Multipart problem with one part: always "condense" (happens
+		#  to match the desirable behavior)
+		if ($curRes->countParts() == 1) {
+		    @parts = ($parts[0]);
+		    $args->{'condensed'} = 1;
+		}
             }
         }