version 1.128, 2002/10/25 15:58:35
|
version 1.129, 2002/10/25 19:47:14
|
Line 828 sub expandnamed {
|
Line 828 sub expandnamed {
|
foreach $parameter (keys(%c)) { |
foreach $parameter (keys(%c)) { |
push @matches,$parameter if ($parameter =~ /$expression/); |
push @matches,$parameter if ($parameter =~ /$expression/); |
} |
} |
if (scalar(@matches )== 0) { |
if (scalar(@matches) == 0) { |
return; |
$returnvalue = 'unmatched parameter: '.$parameter; |
} elsif (scalar(@matches) == 1) { |
} elsif (scalar(@matches) == 1) { |
$returnvalue = '$c{\''.$matches[0].'\'}'; |
$returnvalue = '$c{\''.$matches[0].'\'}'; |
} elsif (scalar(@matches) > 0) { |
} elsif (scalar(@matches) > 0) { |
Line 840 sub expandnamed {
|
Line 840 sub expandnamed {
|
$returnvalue = '$c{\''.$_.'\'}'; |
$returnvalue = '$c{\''.$_.'\'}'; |
} |
} |
} |
} |
|
} else { |
|
# There was a negative number of matches, which indicates |
|
# something is wrong with reality. Better warn the user. |
|
$returnvalue = 'bizzare parameter: '.$parameter; |
} |
} |
return $returnvalue; |
return $returnvalue; |
} |
} |
Line 946 ENDDEFS
|
Line 950 ENDDEFS
|
} |
} |
|
|
# |
# |
# This is actually used for the student spreadsheet, not the assessment sheet |
# |
# Do not be fooled by the name! |
|
# |
# |
sub templaterow { |
sub templaterow { |
my $sheet = shift; |
my $sheet = shift; |