--- loncom/interface/statistics/lonstathelpers.pm 2004/09/16 21:54:22 1.23 +++ loncom/interface/statistics/lonstathelpers.pm 2004/09/23 14:35:25 1.24 @@ -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 @@ sub ProblemSelector { =pod -=item &MultpleProblemSelector($navmap,$selected,$inputname) +=item &MultipleProblemSelector($navmap,$selected,$inputname) Generate HTML with checkboxes for problem selection. @@ -206,7 +206,7 @@ sub MultipleProblemSelector { # 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 @@ END 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 @@ END #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 @@ sub new_accumulator { } $target.= 'value="'.&Apache::lonnet::escape($res->symb).'" />'. - ' '. - &get_title($res->title,$res->symb).'</label></td>'. + ' '.$res->compTitle.'</label></td>'. '</tr>'.$/; } else { if (defined($target)) {