Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add filters for graduate and undergraduate courses

  • Loading branch information...
commit 16ffe40f4ada848ec48e30b05041e039874d152b 1 parent f488bcf
@saltybeagle saltybeagle authored
View
15 src/UNL/Services/CourseApproval/Filter/ExcludeGraduateCourses.php
@@ -0,0 +1,15 @@
+<?php
+class UNL_Services_CourseApproval_Filter_ExcludeGraduateCourses extends FilterIterator
+{
+ function accept()
+ {
+ $course = $this->getInnerIterator()->current();
+ foreach ($course->codes as $listing) {
+ if ($listing->courseNumber < 500) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
View
15 src/UNL/Services/CourseApproval/Filter/ExcludeUndergraduateCourses.php
@@ -0,0 +1,15 @@
+<?php
+class UNL_Services_CourseApproval_Filter_ExcludeUndergraduateCourses extends FilterIterator
+{
+ function accept()
+ {
+ $course = $this->getInnerIterator()->current();
+ foreach ($course->codes as $listing) {
+ if ($listing->courseNumber >= 500) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.