Grades from defenses are now the same for the group
This commit is contained in:
parent
ea711bc7bc
commit
f5ff3c83b3
27
ACU/Trace.pm
27
ACU/Trace.pm
@ -133,14 +133,23 @@ sub getIds
|
||||
{
|
||||
my $self = shift;
|
||||
my $login = shift;
|
||||
my $onlyNonZero = shift // 0;
|
||||
|
||||
my %ids;
|
||||
foreach my $group (@{ $self->{groups} })
|
||||
{
|
||||
my %tmp = $group->getIds($login);
|
||||
my %tmp;
|
||||
if ($self->{type} eq "defense")
|
||||
{
|
||||
# For a defense, we consider that this is a group grade, so don't consider login filtering
|
||||
%tmp = $group->getIds();
|
||||
} else {
|
||||
%tmp = $group->getIds($login);
|
||||
}
|
||||
|
||||
while (my ($key, $value) = each %tmp)
|
||||
{
|
||||
$ids{$key} = $value;
|
||||
$ids{$key} = $value if !$onlyNonZero || $value;
|
||||
}
|
||||
}
|
||||
return \%ids;
|
||||
@ -148,19 +157,7 @@ sub getIds
|
||||
|
||||
sub getNonZeroIds
|
||||
{
|
||||
my $self = shift;
|
||||
my $login = shift;
|
||||
|
||||
my %ids;
|
||||
foreach my $group (@{ $self->{groups} })
|
||||
{
|
||||
my %tmp = $group->getIds($login);
|
||||
while (my ($key, $value) = each %tmp)
|
||||
{
|
||||
$ids{$key} = $value if $value;
|
||||
}
|
||||
}
|
||||
return \%ids;
|
||||
return getIds($_[0], $_[1], 1);
|
||||
}
|
||||
|
||||
sub getValue
|
||||
|
Reference in New Issue
Block a user