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

Modifyied the way the effective semester is displayed ie: 20091 => Fall 2008 (091)

parent d063f077
No related branches found
No related tags found
No related merge requests found
......@@ -2465,6 +2465,19 @@ class Courses_CourseModel extends Unl_Model
{
return $this->_data['effectiveSemester'];
}
public function getEffectiveSemesterDescription()
{
$year = substr($this->_data['effectiveSemester'], 0, 4);
$term = substr($this->_data['effectiveSemester'], 4);
$termDescriptions = array(1 => 'Fall', 'Spring', 'Summer');
if ($term == 1) {
$year--;
}
$term = $termDescriptions[$term];
return $term . ' ' . $year . ' (' . substr($this->_data['effectiveSemester'], 2) . ')';
}
public function setEffectiveSemester($semester)
{
......
......@@ -124,7 +124,7 @@
</tr>
<tr>
<th>Effective Term</th>
<td><?php echo $course->getEffectiveSemester(); ?></td>
<td><?php echo $course->getEffectiveSemesterDescription(); ?></td>
</tr>
<tr>
<th>Most Recent Action</th>
......
......@@ -69,7 +69,7 @@ class Iace_IndexController extends App_Controller_Action
. implode(', ', $course->getCampuses()) . "\t"
. implode(', ', $course->getDeliveryMethods()) . "\t"
. implode(', ', $course->getTermsOffered()) . "\t"
. $course->getEffectiveSemester() . "\t"
. $course->getEffectiveSemesterDescription() . "\t"
. $course->getPrerequisite() . "\t"
. $course->getNotes() . "\t"
. $course->getDescription() . "\t"
......
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