Archived
1
0

Always return a valid integer

This commit is contained in:
Mercier Pierre-Olivier 2013-09-21 16:56:43 +02:00
parent 6b64c6c0a2
commit b3f61617f3

View File

@ -157,13 +157,12 @@ sub compute ($)
sub computeXML ($;$)
{
my $self = shift;
my $sum = 0;
my $doc = XML::LibXML::Document->new('1.0');
my $root = $doc->createElement("grading");
for my $grade (@{ $self->{tree} }) {
my $tmp = $grade->compute($self->{operators}, $self->{ids}, $doc, $root);
$grade->compute($self->{operators}, $self->{ids}, $doc, $root);
}
$root->addChild( $doc->createAttribute("max", $self->{max}) );
@ -268,7 +267,6 @@ sub compute ($$$;$$)
$grade->addChild( $doc->createAttribute("value", $res) ) if ($grade);
return $grade if ($grade);
return $res;
}