my @problems = map { $_->rawproblem } $self->contest_problems->search({contest => $ct}, {qw/join problem order_by problem.level/});
my (%scores, %tries, %opens);
$opens{$_->rawproblem, $_->rawowner} = $_ for $self->opens->search({contest => $ct});
- for my $job ($self->jobs->search({contest => $ct}, {qw/order_by me.id prefetch/ => [qw/problem/]})) {
+ for my $job ($self->jobs->search({contest => $ct, result => {'!=', undef}}, {qw/order_by me.id prefetch/ => [qw/problem/]})) {
my $open = $opens{$job->rawproblem, $job->rawowner};
my $time = $job->date - ($open ? $open->time : $self->start);
next if $time < 0;