]> iEval git - gruntmaster-page.git/blobdiff - lib/Plack/App/Gruntmaster.pm
Sort problems in standings by value and fix standings JSON
[gruntmaster-page.git] / lib / Plack / App / Gruntmaster.pm
index 991159bf02bef79973aeeac2f6659c78002ab0c8..efcedf54a23e74f79fae336dfa64733b020df16d 100644 (file)
@@ -144,7 +144,10 @@ sub dispatch_request{
                sub (/st/:contest) {
                        response st => 'Standings', {
                                st => [ contest->standings ],
-                               problems => [map { $_->problem } contest->contest_problems],
+                               problems => [
+                                       map { [$_->id, $_->name] }
+                                       sort { $a->value <=> $b->value }
+                                       map { $_->problem } contest->contest_problems],
                        }, 10
                },
 
This page took 0.020033 seconds and 4 git commands to generate.