]> iEval git - gruntmaster-data.git/blobdiff - lib/Gruntmaster/Data/Result/Problem.pm
Add a column precnt - number of pretests
[gruntmaster-data.git] / lib / Gruntmaster / Data / Result / Problem.pm
index fe5523d62ced72ae2b9fa3316a63244eeffdacfe..2ce4f68524be60a712e1102adaf16f1170e3b625 100644 (file)
@@ -115,6 +115,13 @@ Statement (HTML)
 
 Number of tests
 
+=head2 precnt
+
+  data_type: 'integer'
+  is_nullable: 1
+
+Number of pretests. NULL indicates full feedback.
+
 =head2 tests
 
   data_type: 'text'
@@ -195,6 +202,8 @@ __PACKAGE__->add_columns(
   { data_type => "text", is_nullable => 0 },
   "testcnt",
   { data_type => "integer", is_nullable => 0 },
+  "precnt",
+  { data_type => "integer", is_nullable => 1 },
   "tests",
   { data_type => "text", is_nullable => 1 },
   "timeout",
@@ -311,8 +320,8 @@ Composing rels: L</contest_problems> -> contest
 __PACKAGE__->many_to_many("contests", "contest_problems", "contest");
 
 
-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-19 16:54:00
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QZHyWOWaPmTm/EQ5M22CGA
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-02-14 09:42:26
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sc9vhXkFlp0UaLK7w0OUXA
 
 use Class::Method::Modifiers qw/after/;
 
@@ -320,10 +329,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;
 };
 
 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.017705 seconds and 4 git commands to generate.