Integrate final grade into grade.xml
This commit is contained in:
parent
f4ce8c79e0
commit
8ecbd779d0
2 changed files with 10 additions and 13 deletions
|
|
@ -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 );
|
||||
|
|
|
|||
Reference in a new issue