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,
$contest &&= $self->contest($contest);
+{
$pb->get_columns,
+ @limits ? (limits => \@limits) : (),
owner_name => $pb->owner->name,
cansubmit => !$contest || !$contest->is_finished,
$running ? (