]> iEval git - gruntmaster-page.git/commitdiff
Use open_time instead of contest_start in problem timer
authorMarius Gavrilescu <marius@ieval.ro>
Wed, 21 Jan 2015 19:12:19 +0000 (21:12 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Wed, 21 Jan 2015 19:12:19 +0000 (21:12 +0200)
lib/Plack/App/Gruntmaster/HTML.pm

index 5ea06265ec9d3b11980ba9147a6e5b431d97ed25..a4c6da16782fa8004baa9288daba83271f4a72bf 100644 (file)
@@ -148,13 +148,13 @@ sub process_pb_entry {
                $tree->fid('solution')->detach;
                $tree->fid('solution_modal')->detach;
                my $countdown = $tree->fid('countdown');
-               $countdown->attr('data-start' => $args{contest_start});
+               $countdown->attr('data-start' => $args{open_time});
                $countdown->attr('data-stop' => $args{contest_stop});
                $countdown->attr('data-time' => $args{time});
                my $left = $args{contest_stop} - $args{time};
                $countdown->replace_content(sprintf '%02d:%02d:%02d', $left/60/60, $left/60%60, $left%60);
                $tree->fid('score')->attr('data-value' => $args{value});
-               $tree->fid('score')->replace_content(Gruntmaster::Data::calc_score($args{value}, $args{time} - $args{contest_start}, 0, $args{contest_stop} - $args{contest_start}));
+               $tree->fid('score')->replace_content(Gruntmaster::Data::calc_score($args{value}, $args{time} - $args{open_time}, 0, $args{contest_stop} - $args{contest_start}));
        } else {
                $_->detach for $tree->fclass('rc'); # requires contest
                $tree->fid('solution_modal')->fclass('modal-body')->replace_content(literal $args{solution});
This page took 0.025752 seconds and 4 git commands to generate.