]> iEval git - gruntmaster-data.git/commitdiff
Make problems in running or finished contests public
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 6 Feb 2015 14:39:40 +0000 (16:39 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 6 Feb 2015 14:39:49 +0000 (16:39 +0200)
lib/Gruntmaster/Data/Result/Problem.pm

index 6b9b3bfff02ae3156c9332d5aa4cd0c35ed00641..8e073be710c67423e78cefbe2d7f53acc2aaa5ef 100644 (file)
@@ -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;
 }
This page took 0.028805 seconds and 4 git commands to generate.