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

matthew lon-capa-cvs@mail.lon-capa.org
Thu, 23 Sep 2004 14:35:25 -0000


matthew		Thu Sep 23 10:35:25 2004 EDT

  Modified files:              
    /loncom/interface/statistics	lonstathelpers.pm 
  Log:
  MultipleProblemSelector: use $res->compTitle instead of &get_title
  
  
Index: loncom/interface/statistics/lonstathelpers.pm
diff -u loncom/interface/statistics/lonstathelpers.pm:1.23 loncom/interface/statistics/lonstathelpers.pm:1.24
--- loncom/interface/statistics/lonstathelpers.pm:1.23	Thu Sep 16 17:54:22 2004
+++ loncom/interface/statistics/lonstathelpers.pm	Thu Sep 23 10:35:25 2004
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstathelpers.pm,v 1.23 2004/09/16 21:54:22 matthew Exp $
+# $Id: lonstathelpers.pm,v 1.24 2004/09/23 14:35:25 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -169,7 +169,7 @@
 
 =pod
 
-=item &MultpleProblemSelector($navmap,$selected,$inputname)
+=item &MultipleProblemSelector($navmap,$selected,$inputname)
 
 Generate HTML with checkboxes for problem selection.
 
@@ -206,7 +206,7 @@
     # Header
     $Str .= <<"END";
 <script>
-    function checkall(value, checkName) {
+    function checkall(value) {
         for (i=0; i<document.forms.$formname.elements.length; i++) {
             ele = document.forms.$formname.elements[i];
             if (ele.name == '$inputname') {
@@ -231,15 +231,15 @@
     while (my $curRes = $iterator->next()) {
         if ($curRes == $iterator->END_MAP) {
             if (ref($Accumulator[-1]) eq 'CODE') {
-                push(@Sequence_Data,&{$Accumulator[-1]}());
-                pop(@Accumulator);
+                my $old_accumulator = pop(@Accumulator);
+                push(@Sequence_Data,&{$old_accumulator}());
             }
         } elsif ($curRes == $iterator->BEGIN_MAP) {
             # Not much to do here.
         }
         next if (! ref($curRes));
         if ($curRes->is_map) {
-            push(@Accumulator,&new_accumulator($curRes->title,
+            push(@Accumulator,&new_accumulator($curRes->compTitle,
                                                $curRes->src,
                                                $curRes->symb,
                                                $inputname));
@@ -255,7 +255,7 @@
         #my $seq = pop(@Sequence_Data);
         next if (! defined($seq) || ref($seq) ne 'HASH');
         $Str.= '<tr><td colspan="2">'.
-            '<b>'.&get_title($seq->{'title'},$seq->{'src'}).'</b>'.
+            '<b>'.$seq->{'title'}.'</b>'.
             '</td></tr>'.$/;
         $Str.= $seq->{'html'};
     }
@@ -287,8 +287,7 @@
                 }
                 $target.= 
                     'value="'.&Apache::lonnet::escape($res->symb).'" />'.
-                    '&nbsp;'.
-                    &get_title($res->title,$res->symb).'</label></td>'.
+                    '&nbsp;'.$res->compTitle.'</label></td>'.
                     '</tr>'.$/;
             } else { 
                 if (defined($target)) {