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

Diff view will now show when IS status is being added to a course.

parent 08751403
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ class Application_View_Helper_BulletinEntryDiff
{
static protected $_diffRenderer;
public function bulletinEntryDiff($currentCourse, $proposedCourse)
public function bulletinEntryDiff($currentCourse, $proposedCourse, $request)
{
// ES and IS
$currentES = ($currentCourse->isEssentialStudies() == true ? '[ES]' : '');
......@@ -13,6 +13,9 @@ class Application_View_Helper_BulletinEntryDiff
$currentIS = ($currentCourse->integratedStudies == 'yes' ? '[IS]' : '');
$proposedIS = ($proposedCourse->integratedStudies == 'yes' ? '[IS]' : '');
if (in_array($request->type->name, array('AddISToCourse'))) {
$proposedIS = '[IS]';
}
$diffIS = $this->_getDiffText($currentIS, $proposedIS);
$cs = $currentCourse->subject;
......
......@@ -14,12 +14,12 @@ foreach ($this->requestData as $requestDatum) {
?>
<div class="old">
<h2>Previous</h2>
<?php echo $this->bulletinEntryDiff($oldCourse, $newCourse); ?>
<?php echo $this->bulletinEntryDiff($oldCourse, $newCourse, $request); ?>
</div>
<div class="new">
<h2>Current</h2>
<?php echo $this->bulletinEntryDiff($oldCourse, $newCourse); ?>
<?php echo $this->bulletinEntryDiff($oldCourse, $newCourse, $request); ?>
</div>
<?php
} else {
......
......@@ -10,13 +10,13 @@
<div class="current">
<h2>Current</h2>
<div class="bulletinEntry">
<?php echo $this->bulletinEntryDiff($currentGeneration, $proposedGeneration); ?>
<?php echo $this->bulletinEntryDiff($currentGeneration, $proposedGeneration, $this->request); ?>
</div>
</div>
<div class="proposed">
<h2>Proposed</h2>
<div class="bulletinEntry">
<?php echo $this->bulletinEntryDiff($currentGeneration, $proposedGeneration); ?>
<?php echo $this->bulletinEntryDiff($currentGeneration, $proposedGeneration, $this->request); ?>
</div>
</div>
<div class="clear"></div>
......
......@@ -3,7 +3,7 @@
<?php
$originalCourse = $this->course->getParentGeneration(true);
if ($originalCourse) {
echo $this->bulletinEntryDiff($originalCourse, $this->course);
echo $this->bulletinEntryDiff($originalCourse, $this->course, $this->request);
} else {
echo $this->bulletinEntry($this->course);
}
......
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