]> iEval git - gruntmaster-page.git/commitdiff
Use opens when computing standings
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 28 Mar 2014 20:24:09 +0000 (22:24 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 28 Mar 2014 20:24:09 +0000 (22:24 +0200)
lib/Gruntmaster/Page/St.pm

index f1a42c11fb278ac952a73b232d5724a775cb1d55..f5c4049cd9cb85bffc22f06bc5fd1b40cae700e6 100644 (file)
@@ -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);
This page took 0.022274 seconds and 4 git commands to generate.