[algospot-judge] r229 committed - fixed a bug in submissionmodel::GetProblemStatistics...

0 views
Skip to first unread message

codesite...@google.com

unread,
Jul 11, 2010, 4:24:15 AM7/11/10
to algospo...@googlegroups.com
Revision: 229
Author: jongman
Date: Sat Jul 10 22:20:12 2010
Log: fixed a bug in submissionmodel::GetProblemStatistics

when filling in zeros for all possible verdicts, we were filling in
numeric keys instead of string keys
http://code.google.com/p/algospot-judge/source/detail?r=229

Modified:
/trunk/vanillaapp/models/class.submissionmodel.php

=======================================
--- /trunk/vanillaapp/models/class.submissionmodel.php Sat Jul 10 22:19:20
2010
+++ /trunk/vanillaapp/models/class.submissionmodel.php Sat Jul 10 22:20:12
2010
@@ -95,7 +95,7 @@
->Where("IsPublic", 1)
->GroupBy("State");
$ret = array();
- for($i = 0; $i < 11; ++$i) $ret[$i] = 0;
+ for($i = 0; $i < 11; ++$i) $ret[SubmissionState::ToString($i)] = 0;
foreach($this->SQL->Get()->Result() as $row) {
$ret[SubmissionState::ToString($row->State)] = $row->Cnt;
}

Reply all
Reply to author
Forward
0 new messages