Skip to content
Snippets Groups Projects
Commit 036b47f5 authored by Tim Steiner's avatar Tim Steiner
Browse files

Subject/Department/College routers now return the correct list of possible results.

parent 9066917a
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@
class Courses_ApprovalActionCollegeRouterModel extends Requests_ApprovalActionModel
{
protected $_colleges = array();
public static function find($id)
{
$db = Zend_Registry::get('db');
......@@ -52,4 +54,20 @@ class Courses_ApprovalActionCollegeRouterModel extends Requests_ApprovalActionMo
{
// Don't do anything here, this is an automated action.
}
public function getResultStatusStrings()
{
if (count($this->_colleges) == 0) {
$db = Zend_Registry::get('db');
$select = new Zend_Db_Select($db);
$select->from(array('c' => 'creqColleges'));
$records = $select->query()->fetchAll();
$colleges = array();
foreach ($records as $record) {
$colleges[$record['name']] = $record['name'];
}
$this->_colleges = $colleges;
}
return $this->_colleges;
}
}
......@@ -2,6 +2,8 @@
class Courses_ApprovalActionDepartmentRouterModel extends Requests_ApprovalActionModel
{
protected $_departments = array();
public static function find($id)
{
$db = Zend_Registry::get('db');
......@@ -52,4 +54,20 @@ class Courses_ApprovalActionDepartmentRouterModel extends Requests_ApprovalActio
{
// Don't do anything here, this is an automated action.
}
public function getResultStatusStrings()
{
if (count($this->_departments) == 0) {
$db = Zend_Registry::get('db');
$select = new Zend_Db_Select($db);
$select->from(array('d' => 'creqDepartments'));
$records = $select->query()->fetchAll();
$departments = array();
foreach ($records as $record) {
$departments[$record['name']] = $record['name'];
}
$this->_departments = $departments;
}
return $this->_departments;
}
}
......@@ -2,6 +2,8 @@
class Courses_ApprovalActionSubjectRouterModel extends Requests_ApprovalActionModel
{
protected $_subjects = array();
public static function find($id)
{
$db = Zend_Registry::get('db');
......@@ -52,4 +54,20 @@ class Courses_ApprovalActionSubjectRouterModel extends Requests_ApprovalActionMo
{
// Don't do anything here, this is an automated action.
}
public function getResultStatusStrings()
{
if (count($this->_subjects) == 0) {
$db = Zend_Registry::get('db');
$select = new Zend_Db_Select($db);
$select->from(array('s' => 'creqSubjects'));
$records = $select->query()->fetchAll();
$subjects = array();
foreach ($records as $record) {
$subjects[$record['name']] = $record['name'];
}
$this->_subjects = $subjects;
}
return $this->_subjects;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment