From 5401c109413870e3b25d41a5ff6566f0593881be Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Mon, 16 Mar 2015 18:32:48 +0200 Subject: [PATCH] Include limit overrides in problem_entry --- lib/Gruntmaster/Data.pm | 5 +++++ 1 file changed, 5 insertions(+) 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 ? ( -- 2.39.2