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

Add Graduate Studies approvals to the Monthly "UCC" reports.

parent 91d21066
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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
......@@ -73,3 +73,37 @@
</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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment