From: Marius Gavrilescu Date: Tue, 3 Mar 2015 16:39:11 +0000 (+0200) Subject: Remove no longer useful is_private and is_in_archive methods X-Git-Tag: 5999.000_014~64 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=f20668d742eae08b6e1d24048572bdeef0eb51d3;p=gruntmaster-data.git Remove no longer useful is_private and is_in_archive methods --- diff --git a/lib/Gruntmaster/Data/Result/Problem.pm b/lib/Gruntmaster/Data/Result/Problem.pm index 2ce4f68..cec4cc8 100644 --- a/lib/Gruntmaster/Data/Result/Problem.pm +++ b/lib/Gruntmaster/Data/Result/Problem.pm @@ -332,18 +332,6 @@ after qw/insert update delete/ => sub { Gruntmaster::Data::purge '/sol/' . $self->id; }; -sub is_private { - my ($self, $time) = @_; - return 0 if grep { !$_->contest->is_pending($time) } $self->contest_problems; - return 1 if $self->private; - grep { $_->contest->is_pending($time) } $self->contest_problems; -} - -sub is_in_archive { - my ($self, $time) = @_; - 0 == grep { $_->contest->is_running($time) } $self->contest_problems; -} - sub rerun { $_->rerun for shift->jobs } @@ -354,14 +342,6 @@ __END__ =head1 METHODS -=head2 is_private(I<[$time]>) - -Returns true if the problem is private at time I<$time> (which defaults to C