From e70c0637391cdfdc2462243ee5b16d4b8fa60250 Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Fri, 26 Jun 2009 18:38:58 +0000 Subject: [PATCH] Add ES data to UCC summary report and add borders to the table. --- application/modules/courses/models/CourseModel.php | 11 +++++++++++ .../modules/ucc/controllers/ReportsController.php | 2 ++ .../ucc/views/scripts/reports/monthly-summary.phtml | 7 ++++--- document_root/css/ucc/reports/monthly-summary.css | 5 +++++ 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 document_root/css/ucc/reports/monthly-summary.css diff --git a/application/modules/courses/models/CourseModel.php b/application/modules/courses/models/CourseModel.php index 139732c0..ff50211c 100644 --- a/application/modules/courses/models/CourseModel.php +++ b/application/modules/courses/models/CourseModel.php @@ -1893,6 +1893,17 @@ class Courses_CourseModel extends Unl_Model return false; } } + + public function getEssentialStudiesAreas($collegeId = null) + { + $areas = array(); + foreach ((array) $this->_data['esDesignations'] as $esDesignation) { + if (!$collegeId || $collegeId == $esDesignation['college']) { + $areas[$esDesignation['area']] = $esDesignation['area']; + } + } + return $areas; + } public function getDeliveryMethods() { diff --git a/application/modules/ucc/controllers/ReportsController.php b/application/modules/ucc/controllers/ReportsController.php index df9714df..5671b3c2 100644 --- a/application/modules/ucc/controllers/ReportsController.php +++ b/application/modules/ucc/controllers/ReportsController.php @@ -82,6 +82,7 @@ class Ucc_ReportsController extends App_Controller_Action $difference = $currentCourse->getDifferenceSummary($originalCourse, $request); + $es = $originalCourse->getEssentialStudiesAreas(); $data[] = new Unl_Model_Array(array( 'time' => $time->getTimestamp(), 'college' => $originalCourse->getCollege(), @@ -89,6 +90,7 @@ class Ucc_ReportsController extends App_Controller_Action 'title' => $originalCourse->getTitle(), 'difference' => $difference, 'IS' => $originalCourse->isIntegratedStudies(), + 'esAreas' => $originalCourse->getEssentialStudiesAreas(), 'crosslist' => $originalCourse->getCrosslistingsText(), 'course' => $originalCourse->getCourseId() )); diff --git a/application/modules/ucc/views/scripts/reports/monthly-summary.phtml b/application/modules/ucc/views/scripts/reports/monthly-summary.phtml index 9bb370f9..e7a6fbf6 100644 --- a/application/modules/ucc/views/scripts/reports/monthly-summary.phtml +++ b/application/modules/ucc/views/scripts/reports/monthly-summary.phtml @@ -1,5 +1,6 @@ <?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/iace/reports/weekly.css', 'all'); ?> -<table> +<?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/ucc/reports/monthly-summary.css')?> +<table id=""> <tr> <th><a href="<?php echo $this->url(array('sort' => 'time')); ?>">Date Approved</a></th> <th><a href="<?php echo $this->url(array('sort' => 'college')); ?>">College</a></th> @@ -7,7 +8,7 @@ <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' => 'es')); ?>">ES Section</a></th> + <th><a href="<?php echo $this->url(array('sort' => 'esAreas')); ?>">ES Section</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> @@ -23,7 +24,7 @@ <td><?php echo $row->getTitle(); ?></td> <td><?php echo $row->getDifference(); ?></td> <td><?php if($row->getIS()) echo 'Yes'; ?></td> - <td>?</td> + <td><?php echo implode(',', $row->getEsAreas()); ?></td> <td>?</td> <td><?php echo $row->getCrosslist(); ?></td> </tr> diff --git a/document_root/css/ucc/reports/monthly-summary.css b/document_root/css/ucc/reports/monthly-summary.css new file mode 100644 index 00000000..e35749cf --- /dev/null +++ b/document_root/css/ucc/reports/monthly-summary.css @@ -0,0 +1,5 @@ +@CHARSET "UTF-8"; + +#creqMain table {border: 1px solid #000; border-collapse: collapse; margin: 1px;} +#creqMain table td, +#creqMain table th {border: 1px solid #000; padding: 0.5em;} \ No newline at end of file -- GitLab