--- loncom/interface/spreadsheet/Spreadsheet.pm 2004/01/14 16:47:39 1.33 +++ loncom/interface/spreadsheet/Spreadsheet.pm 2004/02/24 17:02:04 1.35 @@ -1,5 +1,5 @@ # -# $Id: Spreadsheet.pm,v 1.33 2004/01/14 16:47:39 matthew Exp $ +# $Id: Spreadsheet.pm,v 1.35 2004/02/24 17:02:04 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -615,7 +615,6 @@ parametername should be a string such as sub MINPARM { my ($expression) = @_; my $min = undef; - study($expression); foreach $parameter (keys(%c)) { next if ($parameter !~ /$expression/); if ((! defined($min)) || ($min > $c{$parameter})) { @@ -640,7 +639,6 @@ parametername should be a string such as sub MAXPARM { my ($expression) = @_; my $max = undef; - study($expression); foreach $parameter (keys(%c)) { next if ($parameter !~ /$expression/); if ((! defined($min)) || ($max < $c{$parameter})) { @@ -846,7 +844,6 @@ sub expandnamed { my @matches = (); my @values = (); $#matches = -1; - study $expression; while (my($parameter,$value) = each(%{$self->{'constants'}})) { next if ($parameter !~ /$expression/); push(@matches,$parameter); @@ -1557,7 +1554,7 @@ sub outsheet_xml { ## But not on this day my $Str = ''."\n"; while (my ($cell,$formula) = each(%{$self->{'formulas'}})) { - if ($cell =~ /^template_(\d+)/) { + if ($cell =~ /^template_(\w+)/) { my $col = $1; $Str .= ''."\n"; } else { @@ -1570,7 +1567,7 @@ sub outsheet_xml { } } $Str.=""; -# $r->print("
\n\n\n".$Str."\n\n\n
"); + $r->print("
\n\n\n".$Str."\n\n\n
"); return $Str; } @@ -1597,8 +1594,7 @@ sub parse_sheet { $formulas{$cell} = $formula; $sources{$cell} = $source if (defined($source)); $parser->get_text('/field'); - } - if ($token->[1] eq 'template') { + } elsif ($token->[1] eq 'template') { $formulas{'template_'.$token->[2]->{'col'}}= $parser->get_text('/template'); }