Permalink
Browse files

Add filters for graduate and undergraduate courses

  • Loading branch information...
saltybeagle committed Apr 15, 2012
1 parent f488bcf commit 16ffe40f4ada848ec48e30b05041e039874d152b
@@ -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;
+ }
+}
@@ -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;
+ }
+}

0 comments on commit 16ffe40

Please sign in to comment.