[algospot-judge] r215 committed - code lengths are counted in characters. sort recent subs correctly.

0 views
Skip to first unread message

codesite...@google.com

unread,
Jul 11, 2010, 3:40:05 AM7/11/10
to algospo...@googlegroups.com
Revision: 215
Author: jongman
Date: Sat Jul 10 22:18:10 2010
Log: code lengths are counted in characters. sort recent subs correctly.
http://code.google.com/p/algospot-judge/source/detail?r=215

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

=======================================
--- /trunk/vanillaapp/controllers/class.problemscontroller.php Sat Jul 10
22:18:04 2010
+++ /trunk/vanillaapp/controllers/class.problemscontroller.php Sat Jul 10
22:18:10 2010
@@ -228,8 +228,8 @@
$this->Render();
}
private function ParseDataTablesQuery($ColumnNames) {
- $OrderFields = "ID";
- $OrderDirection = "asc";
+ $OrderFields = $ColumnNames[0];
+ $OrderDirection = "desc";
$Limit = 9999;
$Offset = 0;
$SearchTerm = FALSE;
@@ -329,7 +329,6 @@
array_push($ExcludeState, $i);
}
$Count = $this->SubmissionModel->GetCount($Author, $ShowHidden);
-
$Submissions = $this->SubmissionModel->GetList($Author,
$ShowHidden, $params["Limit"], $params["Offset"], $ExcludeState,
$params["OrderFields"], $params["OrderDirection"]);
$this->SetData("Count", $Count, TRUE);
$this->SetData("Submissions", $Submissions, TRUE);
=======================================
--- /trunk/vanillaapp/views/problems/ranklist.php Sat Jul 10 22:17:56 2010
+++ /trunk/vanillaapp/views/problems/ranklist.php Sat Jul 10 22:18:10 2010
@@ -111,7 +111,11 @@

}
},
- null,
+ {
+ fnRender: function(obj) {
+ return obj.aData[4] + " chars";
+ }
+ },
{
bVisible: false
},
=======================================
--- /trunk/vanillaapp/views/problems/submissions.php Sat Jul 10 22:17:56
2010
+++ /trunk/vanillaapp/views/problems/submissions.php Sat Jul 10 22:18:10
2010
@@ -54,8 +54,9 @@
aoData = [];
}
aoData.push({ name: "DeliveryType", value: 3});
- aoData.push({ name: "Author", value:
$("#mineonly").attr("checked") ? <?=$this->Session->UserID?> : -1
-});
+ aoData.push({ name: "Author", value:
$("#mineonly").attr("checked") ? <?=$this->Session->UserID?> : -1});
+ aoData.push({ name: "iSortCol_0", value: 0});
+ aoData.push({ name: "sSortCol_0", value: "desc"});
$.getJSON( sSource, aoData, fnCallback);
},
"aoColumns": [
@@ -87,7 +88,11 @@

}
},
- null,
+ {
+ fnRender: function(obj) {
+ return obj.aData[4] + " chars";
+ }
+ },
{
fnRender: function(obj) {
var no = obj.aData[0][0];

Reply all
Reply to author
Forward
0 new messages