Fix grading generation from defenses
This commit is contained in:
parent
39758b9e4b
commit
59aff8677a
5 changed files with 36 additions and 28 deletions
|
@ -41,8 +41,11 @@ do {
|
|||
open $xml, "<", $file or die $!;
|
||||
binmode $xml;
|
||||
|
||||
my $str;
|
||||
$str .= $_ while (<$xml>);
|
||||
|
||||
eval {
|
||||
$trace = Defense->new($xml);
|
||||
$trace = Defense->new($str);
|
||||
};
|
||||
if ($@) {
|
||||
log ERROR, "Unknown file type: $file";
|
||||
|
@ -55,4 +58,4 @@ do {
|
|||
|
||||
} while ($#ARGV >= 0);
|
||||
|
||||
print $grade->to_string();
|
||||
print $grade->toString();
|
||||
|
|
Reference in a new issue