diff --git a/application/modules/requests/models/ApprovalActionVoteModel.php b/application/modules/requests/models/ApprovalActionVoteModel.php
index 637c20a0aa5dd7363daa193acb68969de05852af..471c175f85e688be8ae78d2ce0ecdcdfdd23b0f2 100644
--- a/application/modules/requests/models/ApprovalActionVoteModel.php
+++ b/application/modules/requests/models/ApprovalActionVoteModel.php
@@ -49,7 +49,7 @@ class Requests_ApprovalActionVoteModel extends Requests_ApprovalActionQueueModel
foreach ($records as $record) {
$objectId = $record['approvalAction'];
$date = $record['date'];
- $objects[$objectId]->_data['dates'][] = new Zend_Date($date);
+ $objects[$objectId]->_data['dates'][] = new Zend_Date($date);
}
if (Unl_Util::isArray($objects)) {
@@ -215,7 +215,7 @@ class Requests_ApprovalActionVoteModel extends Requests_ApprovalActionQueueModel
foreach ($votes as $vote) {
$voteTally[$vote['vote']]++;
}
- if ($voteTally['Table'] >= 2) {
+ if ($voteTally['Table'] >= $this->getVotesToTable()) {
$request->setState('Table');
continue;
}
@@ -249,6 +249,11 @@ class Requests_ApprovalActionVoteModel extends Requests_ApprovalActionQueueModel
return $this->_data['quorum'];
}
+ public function getVotesToTable()
+ {
+ return $this->_data['votesToTable'];
+ }
+
public function getRequiredVotes()
{
return $this->_data['requiredVotes'];
diff --git a/application/modules/ucc/controllers/ReportsController.php b/application/modules/ucc/controllers/ReportsController.php
index d99c328c82fde282dde05e8ee44af752d4959637..2e1adaeecf108b4c3696522491d1b387024d6e51 100644
--- a/application/modules/ucc/controllers/ReportsController.php
+++ b/application/modules/ucc/controllers/ReportsController.php
@@ -92,7 +92,7 @@ class Ucc_ReportsController extends App_Controller_Action
$difference = $currentCourse->getDifferenceSummary($originalCourse, $request);
- $voteResult = $this->_tallyVotes($votes, $startDate, $endDate);
+ $voteResult = $this->_tallyVotes($votes, $startDate, $endDate, $approvalAction->getVotesToTable());
$data[] = new Unl_Model_Array(array(
'time' => $time->getTimestamp(),
@@ -152,7 +152,7 @@ class Ucc_ReportsController extends App_Controller_Action
$requestVoteTally[$requestId][$vote->getVote()]++;
}
- $requestVoteResults[$requestId] = $this->_tallyVotes($votes, $startDate, $endDate);
+ $requestVoteResults[$requestId] = $this->_tallyVotes($votes, $startDate, $endDate, $approvalAction->getVotesToTable());
}
$this->view->requestVoteTally = $requestVoteTally;
$this->view->requestVoteResults = $requestVoteResults;
@@ -183,7 +183,7 @@ class Ucc_ReportsController extends App_Controller_Action
$requestVoteTally[$requestId][$vote->getVote()]++;
}
- $requestVoteResults[$requestId] = $this->_tallyVotes($votes, $startDate, $endDate);
+ $requestVoteResults[$requestId] = $this->_tallyVotes($votes, $startDate, $endDate, $approvalAction->getVotesToTable());
}
$this->view->aceRequestVoteTally = $requestVoteTally;
$this->view->aceRequestVoteResults = $requestVoteResults;
@@ -195,7 +195,7 @@ class Ucc_ReportsController extends App_Controller_Action
$this->render('monthly-extended');
}
- protected function _tallyVotes($votes, $startDate, $endDate)
+ protected function _tallyVotes($votes, $startDate, $endDate, $votesToTable)
{
$voteTally = array();
$voteResult = '';
@@ -214,7 +214,7 @@ class Ucc_ReportsController extends App_Controller_Action
}
}
- if ($voteCount < 7 || $voteTally['Table'] >= 2) {
+ if ($voteCount < 7 || $voteTally['Table'] >= $votesToTable) {
$voteResult = 'Table';
}