[algospot-judge] r231 committed - Show author info in problems list when reviewing

1 view
Skip to first unread message

codesite...@google.com

unread,
Jul 11, 2010, 4:40:27 AM7/11/10
to algospo...@googlegroups.com
Revision: 231
Author: jongman
Date: Sat Jul 10 22:20:28 2010
Log: Show author info in problems list when reviewing
http://code.google.com/p/algospot-judge/source/detail?r=231

Modified:
/trunk/vanillaapp/models/class.problemmodel.php
/trunk/vanillaapp/views/problems/listproblems.php
/trunk/vanillaapp/views/problems/my.php

=======================================
--- /trunk/vanillaapp/models/class.problemmodel.php Sat Jul 10 22:20:19 2010
+++ /trunk/vanillaapp/models/class.problemmodel.php Sat Jul 10 22:20:28 2010
@@ -42,7 +42,7 @@
if(!is_object($ret)) {
$ret = $this->GetWhere(array("No" => $IdOrNo))->FirstRow();
}
-
+ $this->Augment($ret);
return $ret;
}

@@ -54,6 +54,7 @@
->Select("p.State", "", "State")
->Select("p.Accepted", "", "Accepted")
->Select("p.Submissions", "", "Submissions")
+ ->Select("p.Author", "", "Author")
->Select("p.Accepted / p.Submissions", "", "Ratio");
if($Session->IsValid()) {
$this->SQL->Select("count(s.no) > 0", "", "Solved");
=======================================
--- /trunk/vanillaapp/views/problems/listproblems.php Sat Jul 10 22:20:19
2010
+++ /trunk/vanillaapp/views/problems/listproblems.php Sat Jul 10 22:20:28
2010
@@ -10,6 +10,7 @@
?>
[
"<?=$Problem->StateText?>",
+ ["<?=$Problem->AuthorInfo->Name?>", <?=$Problem->Author?>],
<?=$Problem->Solved?>,
"<?=$Problem->ID?>",
"<?=$Problem->Name?>",
=======================================
--- /trunk/vanillaapp/views/problems/my.php Sat Jul 10 22:20:19 2010
+++ /trunk/vanillaapp/views/problems/my.php Sat Jul 10 22:20:28 2010
@@ -18,6 +18,7 @@
<thead>
<tr>
<th>Status</th>
+ <th>Author</th>
<th>AC?</th>
<th>ID</th>
<th><?=T("Name")?></th>
@@ -26,10 +27,6 @@
</tr>
</thead>
<tbody>
- <tr>
- <td colspan="6">Loading..</td>
- </tr>
-
</tbody>
</table>
</div>
@@ -62,6 +59,15 @@
sClass: "center",
},
{
+ bVisible: false,
+ fnRender: function(obj) {
+ var id = obj.aData[1][1], name = obj.aData[1][0];
+ return "<a href=\"<?=Url("/profile")?>/" + id
+ "/" + name + "\">" + name + "</a>";
+ }
+ },
+ {
+ bVisible: false
+ /*
sWidth: "5%",
sClass: "center",
fnRender: function(obj) {
@@ -70,12 +76,12 @@
return "<div class=\"solved_outer_" + outer_class +
"\"><span class=\"solved_inner\">" +
solved_repr +
"</span></div>";
- }
+ }*/
},
- { fnRender: function(obj) { return obj.aData[2]; } },
+ { fnRender: function(obj) { return obj.aData[3]; } },

{ fnRender: function(obj) {
- return "<a href=\"<?=Url("/problems/read")?>/" +
obj.aData[2] + "\">" + obj.aData[3] + "</a>";
+ return "<a href=\"<?=Url("/problems/read")?>/" +
obj.aData[3] + "\">" + obj.aData[4] + "</a>";
}
},

@@ -83,7 +89,7 @@
sWidth: "8%",
sClass: "center",
fnRender: function(obj) {
- return obj.aData[4] + "/" + obj.aData[5];
+ return obj.aData[5] + "/" + obj.aData[6];
}
},
{
@@ -103,7 +109,11 @@
]
} );

- $("#ProblemFilter").change(function() { table.fnReloadAjax(); });
+ $("#ProblemFilter").change(function()
+ {
+ table.fnSetColumnVis(1,
$("#ProblemFilter").val() != "MineOnly" );
+ table.fnReloadAjax();
+ });
} );

function confirmDeletion(link, elem) {

Reply all
Reply to author
Forward
0 new messages