Archived
1
0
Fork 0

Integrate final grade into grade.xml

This commit is contained in:
Mercier Pierre-Olivier 2013-09-21 16:16:34 +02:00
commit 8ecbd779d0
2 changed files with 10 additions and 13 deletions

View file

@ -161,16 +161,11 @@ sub computeXML ($;$)
my $doc = XML::LibXML::Document->new('1.0');
my $root = $doc->createElement("grading");
my $final = $doc->createElement("grade");
for my $grade (@{ $self->{tree} }) {
my $tmp = $grade->compute($self->{operators}, $self->{ids}, $doc, $final);
my $tmp = $grade->compute($self->{operators}, $self->{ids}, $doc, $root);
}
$final->addChild( $doc->createAttribute("value", $self->compute()) );
$final->addChild( $doc->createAttribute("name", "Note finale") );
$root->appendChild( $final );
$root->addChild( $doc->createAttribute("max", $self->{max}) );
$doc->setDocumentElement( $root );