Modified:
/trunk/vanillaapp/models/class.problemmodel.php
/trunk/vanillaapp/views/modules/probleminfo.php
/trunk/vanillaapp/views/problems/edit.php
=======================================
--- /trunk/vanillaapp/models/class.problemmodel.php Sun Jun 27 08:31:49 2010
+++ /trunk/vanillaapp/models/class.problemmodel.php Sat Jul 10 22:19:10 2010
@@ -2,8 +2,18 @@
class ProblemState {
const DRAFT = 0;
- const HIDDEN = 1;
- const PUBLISHED = 2;
+ const PENDING_REVIEW = 1;
+ const HIDDEN = 2;
+ const PUBLISHED = 3;
+
+ static function ToString($Value) {
+ switch($Value) {
+ case DRAFT: return "DRAFT";
+ case PENDING_REVIEW: return "PENDING_REVIEW";
+ case HIDDEN: return "HIDDEN";
+ case PUBLISHED: return "PUBLISHED";
+ }
+ }
};
class ProblemModel extends Gdn_Model {
=======================================
--- /trunk/vanillaapp/views/modules/probleminfo.php Sat Jul 10 22:17:04 2010
+++ /trunk/vanillaapp/views/modules/probleminfo.php Sat Jul 10 22:19:10 2010
@@ -5,9 +5,12 @@
if($this->Problem->State == ProblemState::DRAFT) {
echo(T("This problem is in draft mode."));
}
- else {
+ elseif($this->Problem->State == ProblemState::HIDDEN) {
echo(T("This problem is in hidden mode."));
}
+ elseif($this->Problem->State == ProblemState::PENDING_REVIEW) {
+ echo(T("This problem is pending review."));
+ }
echo("</div>");}
?>
<? if($this->Problem->State == ProblemState::DRAFT || $this->IsAdmin) { ?>
=======================================
--- /trunk/vanillaapp/views/problems/edit.php Sat Jul 10 22:16:17 2010
+++ /trunk/vanillaapp/views/problems/edit.php Sat Jul 10 22:19:10 2010
@@ -6,7 +6,7 @@
</h1>
<? if($this->IsAdmin()) { ?>
<div class="State">
- <?=$this->Form->DropDown("State", array(0 => "DRAFT", 1
=> "HIDDEN", 2 => "PUBLISHED"))?>
+ <?=$this->Form->DropDown("State", array(0 => "DRAFT", 1
=> "PENDING_REVIEW", 2 => "HIDDEN", 3 => "PUBLISHED"))?>
</div>
<? } ?>
<div class="Limits ID">