[algospot-judge] r211 committed - Length is stored when accepting submissions

0 views
Skip to first unread message

codesite...@google.com

unread,
Jul 11, 2010, 3:23:57 AM7/11/10
to algospo...@googlegroups.com
Revision: 211
Author: jongman
Date: Sat Jul 10 22:17:37 2010
Log: Length is stored when accepting submissions
http://code.google.com/p/algospot-judge/source/detail?r=211

Modified:
/trunk/vanillaapp/controllers/class.problemscontroller.php

=======================================
--- /trunk/vanillaapp/controllers/class.problemscontroller.php Sat Jul 10
22:17:25 2010
+++ /trunk/vanillaapp/controllers/class.problemscontroller.php Sat Jul 10
22:17:37 2010
@@ -196,10 +196,11 @@
$this->Form->SetModel($this->SubmissionModel);
if($this->Form->AuthenticatedPostBack() === TRUE) {

- $this->Form->SetFormValue("IsPublic", $this->Problem->State ==
ProblemState::PUBLISHED ? 1 : 0);
-
$Values = $this->Form->FormValues();
assert($Values["Author"] == $this->Session->UserID);
+ $this->Form->SetFormValue("Length",
strlen(preg_replace("/\s+/", "", $Values["Source"])));
+ $this->Form->SetFormValue("IsPublic", $this->Problem->State ==
ProblemState::PUBLISHED ? 1 : 0);
+
if($this->Form->Save()) {
Redirect("/problems/submissions/mine");
}
@@ -329,6 +330,7 @@
array_push($ExcludeState, $i);
}
$Count = $this->SubmissionModel->GetCount($Author, $ShowHidden);
+
$Submissions = $this->SubmissionModel->GetList($Author,
$ShowHidden, $params["Limit"], $params["Offset"], $ExcludeState);
$this->SetData("Count", $Count, TRUE);
$this->SetData("Submissions", $Submissions, TRUE);

Reply all
Reply to author
Forward
0 new messages