From e8cc4fa43dad618ac488e70e9448831bfb5bc7da Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Fri, 28 Mar 2014 22:24:09 +0200 Subject: [PATCH] Use opens when computing standings --- lib/Gruntmaster/Page/St.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Gruntmaster/Page/St.pm b/lib/Gruntmaster/Page/St.pm index f1a42c1..f5c4049 100644 --- a/lib/Gruntmaster/Page/St.pm +++ b/lib/Gruntmaster/Page/St.pm @@ -31,7 +31,8 @@ sub _generate{ for my $job (db($env)->jobs->search({contest => $ct && $ct->id}, {order_by => 'id'})) { if ($ct) { - my $time = $job->date - $ct->start; + my $open = db($env)->open($ct->id, $job->problem->id, $job->owner->id); + my $time = $job->date - ($open || $ct->start); next if $time < 0; my $value = $job->problem->value // LEVEL_VALUES->{$job->problem->level}; $scores{$job->owner->id}{$job->problem->id} = $job->result ? 0 : calc_score ($value, $time, $tries{$job->owner}{$job->problem}, $ct->stop - $ct->start); -- 2.39.2