[algospot-judge] r210 committed - show only accepted submissions in ranklist. hide verdict

1 view
Skip to first unread message

codesite...@google.com

unread,
Jul 11, 2010, 3:15:54 AM7/11/10
to algospo...@googlegroups.com
Revision: 210
Author: jongman
Date: Sat Jul 10 22:17:25 2010
Log: show only accepted submissions in ranklist. hide verdict
http://code.google.com/p/algospot-judge/source/detail?r=210

Modified:
/trunk/vanillaapp/controllers/class.problemscontroller.php
/trunk/vanillaapp/views/problems/ranklist.php

=======================================
--- /trunk/vanillaapp/controllers/class.problemscontroller.php Sat Jul 10
22:17:14 2010
+++ /trunk/vanillaapp/controllers/class.problemscontroller.php Sat Jul 10
22:17:25 2010
@@ -322,8 +322,14 @@
else {
$Author = FALSE;
}
+ $ExcludeState = array();
+ if(isset($_GET["State"])) {
+ for($i = 0; $i < 11; ++$i)
+ if($_GET["State"] != $i)
+ array_push($ExcludeState, $i);
+ }
$Count = $this->SubmissionModel->GetCount($Author, $ShowHidden);
- $Submissions = $this->SubmissionModel->GetList($Author,
$ShowHidden, $params["Limit"], $params["Offset"]);
+ $Submissions = $this->SubmissionModel->GetList($Author,
$ShowHidden, $params["Limit"], $params["Offset"], $ExcludeState);
$this->SetData("Count", $Count, TRUE);
$this->SetData("Submissions", $Submissions, TRUE);
$this->Render();
=======================================
--- /trunk/vanillaapp/views/problems/ranklist.php Sat Jul 10 22:17:14 2010
+++ /trunk/vanillaapp/views/problems/ranklist.php Sat Jul 10 22:17:25 2010
@@ -78,7 +78,13 @@
$.getJSON( sSource, aoData, fnCallback);
},
"aoColumns": [
- null,
+ {
+ fnRender: function(obj) {
+ var dat = obj.aData[0];
+ if(dat[1]) return dat[0];
+ return "<span title='<?=T("Non-public submission.
Does not count in statistics.")?>'>*</a>";
+ }
+ },
{
fnRender: function(obj) {
var dat = obj.aData[1];
@@ -101,15 +107,7 @@
}
},
{
- fnRender: function(obj) {
- var no = obj.aData[0];
- var dat = obj.aData[4];
- var ret = "<span class='Submission" + dat + "'>" +
dat.replace(/_/g, " ") + "</span>";
- if(hasPermission(obj.aData) && (dat
== "COMPILE_ERROR" || dat == "RUNTIME_ERROR")) {
- ret = "<a
href='<?=Url("problems/submission/")?>/" + no + "'>" + ret + "</a>";
- }
- return ret;
- }
+ bVisible: false
},
{
fnRender: function(obj) {

Reply all
Reply to author
Forward
0 new messages