]> iEval git - gruntmaster-page.git/commitdiff
Sort problems correctly in Standings header
authorMarius Gavrilescu <marius@ieval.ro>
Mon, 7 Dec 2015 16:09:11 +0000 (18:09 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Mon, 7 Dec 2015 16:09:11 +0000 (18:09 +0200)
lib/Plack/App/Gruntmaster.pm

index c7c6620ed9f52bfe4952b15ebad4d029cbba8a15..c197f85b6a72c2785542569114807192ef5fb1b4 100644 (file)
@@ -106,7 +106,7 @@ sub dispatch_request{
                },
 
                sub (/st/:contest) {
                },
 
                sub (/st/:contest) {
-                       my @pb = map { [$_->{id}, $_->{name}] } @{problem_list contest => $_{contest}};
+                       my @pb = map { [$_->{id}, $_->{name}] } sort { $a->{value} <=> $b->{value} } @{problem_list contest => $_{contest}};
                        response st => 'Standings', {problems => \@pb, st => standings $_{contest}}, 10
                },
 
                        response st => 'Standings', {problems => \@pb, st => standings $_{contest}}, 10
                },
 
This page took 0.028087 seconds and 4 git commands to generate.