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
Tags
No related merge requests found
......@@ -50,12 +50,25 @@ class RequestController extends Nmc_Controller_Action
Nmc_Registry_Session::getInstance()->erase('course');
} else {
// course found
Nmc_Registry_Session::getInstance()->erase('course');
$out->page = 'request/course_found';
$parentCourse = $course->getParentCourse();
$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;
}
......
<h2>
The Course <?php echo $this->subject , ' '
The course <?php echo $this->subject , ' '
, $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:
</h2>
<ul>
<li>
<a href="/Request/Create/ChangeCourse/<?php echo $this->subject
. '/' . $this->courseNumber
. '/' . $this->courseLetter; ?>">
. '/' . $this->courseNumber
. '/' . $this->courseLetter; ?>">
Request a <b>change</b> to this course
</a>
</li>
<li>
<a href="/Request/Create/AddISToCourse/<?php echo $this->subject
. '/' . $this->courseNumber
. '/' . $this->courseLetter; ?>">
. '/' . $this->courseNumber
. '/' . $this->courseLetter; ?>">
Request <b>Integrated Studies</b> status for this course
</a>
</li>
<li>
<a href="/Request/Create/RemoveCourse/<?php echo $this->subject
. '/' . $this->courseNumber
. '/' . $this->courseLetter; ?>">
. '/' . $this->courseNumber
. '/' . $this->courseLetter; ?>">
Request that this course be <b>removed</b>
</a>
</li>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment