Add some debug string
This commit is contained in:
parent
de06d5fd0d
commit
2037cf531b
1 changed files with 6 additions and 0 deletions
|
@ -66,6 +66,8 @@ sub grades_new_bonus
|
|||
|
||||
for my $kfile (keys %{ $args->{files} })
|
||||
{
|
||||
log DEBUG, "Reading file $kfile";
|
||||
|
||||
my $kbonus = $kfile;
|
||||
$kbonus =~ s/[^a-zA-Z0-9_-]/_/g;
|
||||
|
||||
|
@ -87,6 +89,8 @@ sub grades_new_bonus
|
|||
my $tvalue = $2 // $value;
|
||||
my $trace;
|
||||
|
||||
log DEBUG, "Applying bonus for $login:$tvalue";
|
||||
|
||||
if (-e "$basedir/$year/$project_id/traces/bonus/$login.xml") {
|
||||
open my $xml, "<", "$basedir/$year/$project_id/traces/bonus/$login.xml" or croak $!;
|
||||
binmode $xml;
|
||||
|
@ -99,6 +103,8 @@ sub grades_new_bonus
|
|||
|
||||
$trace->addId($kbonus, $tvalue);
|
||||
|
||||
log DEBUG, "Updating $basedir/$year/$project_id/traces/bonus/$login.xml";
|
||||
|
||||
open my $xml, ">", "$basedir/$year/$project_id/traces/bonus/$login.xml" or croak $!;
|
||||
print $xml $trace->toString();
|
||||
close $xml
|
||||
|
|
Reference in a new issue