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

Add notification if a course found in a search is actually a crosslist of another.

parent 5e455f00
No related branches found
No related tags found
No related merge requests found
...@@ -50,12 +50,25 @@ class RequestController extends Nmc_Controller_Action ...@@ -50,12 +50,25 @@ class RequestController extends Nmc_Controller_Action
Nmc_Registry_Session::getInstance()->erase('course'); Nmc_Registry_Session::getInstance()->erase('course');
} else { } else {
// course found // course found
Nmc_Registry_Session::getInstance()->erase('course'); Nmc_Registry_Session::getInstance()->erase('course');
$out->page = 'request/course_found'; $out->page = 'request/course_found';
$parentCourse = $course->getParentCourse(); $parentCourse = $course->getParentCourse();
$course = clone $parentCourse; $course = clone $parentCourse;
if ($course->subject != $subject ||
$course->courseNumber != $courseNumber ||
$course->courseLetter != $courseLetter)
{
$out->crosslisting = true;
$out->homeSubject = $course->subject;
$out->homeCourseLetter = $course->courseLetter;
$out->homeCourseNumber = $course->courseNumber;
} else {
$out->crosslisting = false;
}
Nmc_Registry_Session::getInstance()->course = $course; Nmc_Registry_Session::getInstance()->course = $course;
} }
......
<h2> <h2>
The Course <?php echo $this->subject , ' ' The course <?php echo $this->subject , ' '
, $this->courseNumber , $this->courseNumber
, $this->courseLetter; ?> Already Exists. , $this->courseLetter; ?>
<?php if(!$this->crosslisting) { ?>
currently exists.
<?php } else { ?>
currently exists as a crosslisting of
<?php echo trim($this->homeSubject . ' '
. $this->homeCourseNumber . ' '
. $this->homeCourseLetter) . '.'; ?>
<?php } ?>
<br />
You may: You may:
</h2> </h2>
<ul> <ul>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment