From: Marius Gavrilescu Date: Fri, 6 Feb 2015 14:39:40 +0000 (+0200) Subject: Make problems in running or finished contests public X-Git-Tag: 5999.000_014~80 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=e6a01c9f7e096edf7fb3e53d6e32fcb043b7f29d;p=gruntmaster-data.git Make problems in running or finished contests public --- diff --git a/lib/Gruntmaster/Data/Result/Problem.pm b/lib/Gruntmaster/Data/Result/Problem.pm index 6b9b3bf..8e073be 100644 --- a/lib/Gruntmaster/Data/Result/Problem.pm +++ b/lib/Gruntmaster/Data/Result/Problem.pm @@ -320,11 +320,12 @@ after qw/insert update delete/ => sub { my ($self) = @_; Gruntmaster::Data::purge '/pb/'; Gruntmaster::Data::purge '/pb/' . $self->id; - Gruntmaster::Data::purge '/sol/' . $self->id; + Gruntmaster::Data::purge '/csol/' . $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; }