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

A better way to filter out internal decisions from UCC monthly reports.

parent 943c2868
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
class Ucc_ReportsController extends App_Controller_Action class Ucc_ReportsController extends App_Controller_Action
{ {
protected $_internalDecisions = array('UCC Queue');
public function indexAction() public function indexAction()
{ {
$this->_redirect('/ucc/reports/monthly'); $this->_redirect('/ucc/reports/monthly');
...@@ -125,6 +127,9 @@ class Ucc_ReportsController extends App_Controller_Action ...@@ -125,6 +127,9 @@ class Ucc_ReportsController extends App_Controller_Action
$endDate->isEarlier($aHistory->getTime())) { $endDate->isEarlier($aHistory->getTime())) {
continue; continue;
} }
if (in_array($aHistory->getDecision(), $this->_internalDecisions)) {
continue;
}
$time = $aHistory->getTime(); $time = $aHistory->getTime();
$voteResult = $aHistory->getDecision(); $voteResult = $aHistory->getDecision();
} }
...@@ -139,10 +144,6 @@ class Ucc_ReportsController extends App_Controller_Action ...@@ -139,10 +144,6 @@ class Ucc_ReportsController extends App_Controller_Action
$voteResult = $this->_tallyVotes($votes, $startDate, $endDate, $approvalAction->getVotesToTable()); $voteResult = $this->_tallyVotes($votes, $startDate, $endDate, $approvalAction->getVotesToTable());
} }
if (in_array($voteResult, array('UCC Queue'))) {
continue;
}
$data[] = new Unl_Model_Array(array( $data[] = new Unl_Model_Array(array(
'time' => $time->getTimestamp(), 'time' => $time->getTimestamp(),
'college' => $originalCourse->getCollege(), 'college' => $originalCourse->getCollege(),
...@@ -245,6 +246,9 @@ class Ucc_ReportsController extends App_Controller_Action ...@@ -245,6 +246,9 @@ class Ucc_ReportsController extends App_Controller_Action
$endDate->isEarlier($aHistory->getTime())) { $endDate->isEarlier($aHistory->getTime())) {
continue; continue;
} }
if (in_array($aHistory->getDecision(), $this->_internalDecisions)) {
continue;
}
$requestVoteResults[$requestId] = $aHistory->getDecision(); $requestVoteResults[$requestId] = $aHistory->getDecision();
} }
} }
......
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