]> iEval git - gruntmaster-data.git/commitdiff
Include limit overrides in problem_entry
authorMarius Gavrilescu <marius@ieval.ro>
Mon, 16 Mar 2015 16:32:48 +0000 (18:32 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Mon, 16 Mar 2015 16:32:48 +0000 (18:32 +0200)
lib/Gruntmaster/Data.pm

index fa81e76b926301d25eaf33e7963d2fa6b02b8f45..fbfabcff39fc6a7d67f325f0662d0d90fba83f12 100644 (file)
@@ -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 ? (
This page took 0.024378 seconds and 4 git commands to generate.