This patch is meant to start a discussion more than anything else. We currently have no way of sorting test results in a reasonable order. If we sort by testedRating the order is not what we want. IE: Bronze, Garbage, Gold, Platinum and Silver.
It might be better in the long run to replace testedRating in testResults with ratingId. That however is a fairly big project.
(You need to run the table/testRating.sql script in mysql to test this patch out.)
Change Log: Sort test results by rating in distributions
Files Changed: include/distributions.php
New File: tables/testRating.sql