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

Remove the ability to create a new request on a course for which a request currently exists.

parent a919d818
No related branches found
No related tags found
No related merge requests found
......@@ -35,9 +35,12 @@ class RequestController extends Nmc_Controller_Action
$courseNumber = Zend_Filter_Digits::filter($in[1]);
$courseLetter = Zend_Filter_Alpha::filter($in[2]);
$course = CourseCrosslistings::fetchBySubjectNumberLetter($subject,
$courseNumber,
$courseLetter);
$course = CourseCrosslistings::fetchBySubjectNumberLetter(
$subject, $courseNumber, $courseLetter
);
$requestedCourse = CourseCrosslistings::fetchBySubjectNumberLetter(
$subject, $courseNumber, $courseLetter, false
);
$out = new Application_View();
$out->subject = $subject;
......@@ -72,6 +75,12 @@ class RequestController extends Nmc_Controller_Action
Nmc_Registry_Session::getInstance()->course = $course;
}
if ($requestedCourse) {
$out->currentPendingRequest = true;
} else {
$out->currentPendingRequest = false;
}
$out->tagline = 'Course Search Results';
echo $out->render('unlModernWrapper.xhtml');
}
......
......@@ -11,6 +11,14 @@
Please contact the home department for requesting action on this course.
<h2>
<?php } else { ?>
<?php if ($this->currentPendingRequest) { ?>
<h2 class="warning">
Warning! This course is currently awaiting approval in an active request!<br />
You probably do not want to submit another request for this course!
</h2>
<?php } else { ?>
<h2>
The course <?php echo $this->subject , ' '
, $this->courseNumber
......@@ -48,4 +56,4 @@
</li>
</ul>
<?php }
\ No newline at end of file
<?php } }
\ No newline at end of file
<div class="content">
<h2>The course <?php echo $this->subject , ' '
<?php if ($this->currentPendingRequest) { ?>
<h2 class="warning">
Warning! This course is currently awaiting approval in an active request!<br />
You probably do not want to submit another request for this course!
</h2>
<?php } else {?>
<h2>
The course <?php echo $this->subject , ' '
, $this->courseNumber
, $this->courseLetter; ?>
does not yet exist.
You may:</h2>
You may:
</h2>
<ul>
<li>
<a href="/Request/Create/NewCourse/<?php echo $this->subject
......@@ -25,4 +33,5 @@
</a>
</li>
</ul>
<?php } ?>
</div>
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