Always return a valid integer
This commit is contained in:
parent
6b64c6c0a2
commit
b3f61617f3
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user