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

stredwic lon-capa-cvs@mail.lon-capa.org
Mon, 01 Jul 2002 13:59:13 -0000


stredwic		Mon Jul  1 09:59:13 2002 EDT

  Modified files:              
    /loncom/interface	lonchart.pm 
  Log:
  Fixed the problem where the columns didn't line up for sometimes if they
  were longer than the headings.  This problem occurred because I forgot
  to split on the parts of a problem therefore the calculation for column
  width was not including multiple parts.
  
  
Index: loncom/interface/lonchart.pm
diff -u loncom/interface/lonchart.pm:1.46 loncom/interface/lonchart.pm:1.47
--- loncom/interface/lonchart.pm:1.46	Fri Jun 28 17:12:46 2002
+++ loncom/interface/lonchart.pm	Mon Jul  1 09:59:13 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # (Publication Handler
 #
-# $Id: lonchart.pm,v 1.46 2002/06/28 21:12:46 stredwic Exp $
+# $Id: lonchart.pm,v 1.47 2002/07/01 13:59:13 stredwic Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -513,9 +513,12 @@
 		    $hash{'title_'.$currentResourceID};
 
                 my $totalProblems=0;
-                foreach (split(/\:/,$CacheData{$currentSequence.
+                foreach my $currentProblem (split(/\:/,
+                                               $CacheData{$currentSequence.
                                                ':problems'})) {
-                    foreach ($CacheData{$currentSequence.':'.$_.':parts'}) {
+                    foreach (split(/\:/,$CacheData{$currentSequence.':'.
+                                                   $currentProblem.
+                                                   ':parts'})) {
                         $totalProblems++;
                     }
                 }