diff --git a/inc/class.schedule.php b/inc/class.schedule.php --- a/inc/class.schedule.php +++ b/inc/class.schedule.php @@ -297,6 +297,25 @@ class Schedule if($this->nPermutations > 0) { + /* + * Figure out if we have to deal with Saturday and then deal + * with it. + */ + $max_day_plusone = 5; + $have_saturday = FALSE; + foreach ($this->courses as $course) + { + for ($si = 0; $si < $course->getnsections(); $si ++) + foreach ($course->getSection($si)->getMeetings() as $meeting) + if ($meeting->getDay(5)) + { + $max_day_plusone = 6; + $have_saturday = TRUE; + break; + } + if ($have_saturday) + break; + } echo '
Enter these codes into your school\'s online course registration system to register for classes: