From: Marius Gavrilescu Date: Mon, 16 Mar 2015 16:32:48 +0000 (+0200) Subject: Include limit overrides in problem_entry X-Git-Tag: 5999.000_014~53 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=5401c109413870e3b25d41a5ff6566f0593881be;p=gruntmaster-data.git Include limit overrides in problem_entry --- diff --git a/lib/Gruntmaster/Data.pm b/lib/Gruntmaster/Data.pm index fa81e76..fbfabcf 100644 --- a/lib/Gruntmaster/Data.pm +++ b/lib/Gruntmaster/Data.pm @@ -98,6 +98,10 @@ sub problem_entry { push @columns, 'statement'; push @columns, 'solution' unless $running; my $pb = $self->problems->find($id, {columns => \@columns, prefetch => 'owner'}); + my @limits = map { +{ + format => $_->format, + timeout => $_->timeout, + } } $self->limits->search({problem => $id}); my $open; $open = $self->opens->find_or_create({ contest => $contest, @@ -108,6 +112,7 @@ sub problem_entry { $contest &&= $self->contest($contest); +{ $pb->get_columns, + @limits ? (limits => \@limits) : (), owner_name => $pb->owner->name, cansubmit => !$contest || !$contest->is_finished, $running ? (