diff --git a/application/modules/ucc/controllers/ReportsController.php b/application/modules/ucc/controllers/ReportsController.php index 06bafc2704a91cda63a26d9a09fe61c7cdeecc1b..04feb35f6bba46c8ddd17aa400471e6ebee04d0a 100644 --- a/application/modules/ucc/controllers/ReportsController.php +++ b/application/modules/ucc/controllers/ReportsController.php @@ -96,6 +96,7 @@ class Ucc_ReportsController extends Creq_Controller_Action $this->view->data = $this->_getSummaryData($startDate, $endDate, 31); $this->view->aceData = $this->_getSummaryData($startDate, $endDate, 313); $this->view->aceData->merge($this->_getSummaryData($startDate, $endDate, 325), TRUE); + $this->view->gradData = $this->_getSummaryData($startDate, $endDate, 362); $session = new Zend_Session_Namespace(__CLASS__); @@ -279,6 +280,12 @@ class Ucc_ReportsController extends Creq_Controller_Action $this->view->aceRequestVoteResults = $requestVoteResults; + $gradApprovalAction = Requests_ApprovalActionModel::find(362); + $gradRequests = Requests_ApprovalHistoryModel::findRequestsWithinTimeRangeAndApprovalAction($startDate, $endDate, $gradApprovalAction); + + $this->view->gradRequests = $gradRequests; + $this->view->gradCurrentCourses = Courses_CourseModel::findLatestOfRequest($gradRequests); + $this->view->gradOriginalCourses = Courses_CourseModel::findParentOfRequest($gradRequests); diff --git a/application/modules/ucc/views/scripts/reports/monthly-extended.phtml b/application/modules/ucc/views/scripts/reports/monthly-extended.phtml index a09603570e9b14dbea36d27075de86f3fc6afc0f..429edd331ad3e5f93a867d312d2d465267bfc960 100644 --- a/application/modules/ucc/views/scripts/reports/monthly-extended.phtml +++ b/application/modules/ucc/views/scripts/reports/monthly-extended.phtml @@ -46,3 +46,22 @@ foreach ($this->aceRequests as $request) { ksort($results); echo implode(PHP_EOL, $results); ?> + + +<h1>Graduate Studies</h1> +<?php +$results = array(); +foreach ($this->gradRequests as $request) { + if ($this->gradOriginalCourses[$request->getId()]) { + $key = $this->gradOriginalCourses[$request->getId()]->getCourseCode(); + } else { + $key = $this->gradCurrentCourses[$request->getId()]->getCourseCode(); + } + $results[$key] = $this->partial('reports/extended-request.phtml', array('request' => $request, + 'originalCourses' => $this->gradOriginalCourses, + 'currentCourses' => $this->gradCurrentCourses)); +} + +ksort($results); +echo implode(PHP_EOL, $results); +?> \ No newline at end of file diff --git a/application/modules/ucc/views/scripts/reports/monthly-summary.phtml b/application/modules/ucc/views/scripts/reports/monthly-summary.phtml index 20cab79a88e97bb41c53727e9ba8365ac4cbab7d..27cc89261c9d30e65ae491e8c56a3b8bff87ee6f 100644 --- a/application/modules/ucc/views/scripts/reports/monthly-summary.phtml +++ b/application/modules/ucc/views/scripts/reports/monthly-summary.phtml @@ -72,4 +72,38 @@ <td><?php echo $row->getCrosslist(); ?></td> </tr> <?php } ?> +</table> + +<h2>Graduate Studies</h2> +<table id=""> + <tr> + <th><a href="<?php echo $this->url(array('sort' => 'time')); ?>">Action Date</a></th> + <th><a href="<?php echo $this->url(array('sort' => 'voteResult')); ?>">Vote</th> + <th><a href="<?php echo $this->url(array('sort' => 'college')); ?>">College</a></th> + <th><a href="<?php echo $this->url(array('sort' => 'courseCode')); ?>">Subj/Course #</a></th> + <th><a href="<?php echo $this->url(array('sort' => 'title')); ?>">Title</a></th> + <th><a href="<?php echo $this->url(array('sort' => 'difference')); ?>">Action Requested</a></th> + <th><a href="<?php echo $this->url(array('sort' => 'is')); ?>">IS</a></th> + <th><a href="<?php echo $this->url(array('sort' => 'esAreas')); ?>">ES</a></th> + <!-- <th><a href="<?php echo $this->url(array('sort' => 'SF')); ?>">SF</a></th --> + <th><a href="<?php echo $this->url(array('sort' => 'crosslist')); ?>">X-list</a></th> + </tr> + <?php foreach ($this->gradData as $row) { ?> + <tr> + <td><?php echo date('m/d/Y', $row->getTime())?></td> + <td><?php echo $row->getVoteResult(); ?></td> + <td><?php echo $row->getCollege(); ?></td> + <td> + <a href="<?php echo $this->baseUrl(); ?>/courses/public-view/view/id/<?php echo $row->getCourse(); ?>"> + <?php echo $row->getCourseCode(); ?> + </a> + </td> + <td><?php echo $row->getTitle(); ?></td> + <td><?php echo $row->getDifference(); ?></td> + <td><?php if($row->getIS()) echo 'Yes'; ?></td> + <td><?php echo implode(',', $row->getEsAreas()); ?></td> + <!-- td>?</td --> + <td><?php echo $row->getCrosslist(); ?></td> + </tr> + <?php } ?> </table> \ No newline at end of file