From: Marius Gavrilescu Date: Mon, 7 Dec 2015 16:09:11 +0000 (+0200) Subject: Sort problems correctly in Standings header X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=cf22c656aa3dd064d854f751d78ea401558674ae;p=plack-app-gruntmaster.git Sort problems correctly in Standings header --- diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index c7c6620..c197f85 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -106,7 +106,7 @@ sub dispatch_request{ }, 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 },