Add result count to the statistics page.

This commit is contained in:
zach%zachlipton.com 2005-08-23 05:25:03 +00:00
parent 20239e5b10
commit 4f8ba67022
2 changed files with 6 additions and 0 deletions

View File

@ -39,6 +39,9 @@ my $numtests = Litmus::DB::Test->count_all();
# find the number of users in the database
my $numusers = Litmus::DB::User->count_all();
# find the number of results in the database:
my $numresults = Litmus::DB::Testresult->count_all();
# get a list of the top 15 testers of all time, sorted by the number
# of test results submitted:
my $dbh = Litmus::DB::User->db_Main();
@ -63,6 +66,7 @@ while (@curtester = $sth->fetchrow_array()) {
my $vars = {
numtests => $numtests,
numusers => $numusers,
numresults => $numresults,
toptesters => \@toptesters,
};

View File

@ -21,6 +21,7 @@
[%# INTERFACE:
# $numtests - the number of tests in the database
# $numusers - the number of users in the database
# $numresults - the number of results in the database
# @toptesters - an array of the top testers in the system, where each
# element contains a hash with keys "email" and "numtests"
#%]
@ -34,6 +35,7 @@
<ul>
<li>Testcases - [% numtests FILTER html %] testcases</li>
<li>Users - [% numusers FILTER html %] users</li>
<li>Results - [% numresults FILTER html %] results</li>
</ul>
<p class="pageinstruction">Tester Statistics</p>