From e6a01c9f7e096edf7fb3e53d6e32fcb043b7f29d Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Fri, 6 Feb 2015 16:39:40 +0200 Subject: [PATCH] Make problems in running or finished contests public --- lib/Gruntmaster/Data/Result/Problem.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.39.2