function _CourseList::dec_specified_repeats

4.x _CourseList.php _CourseList::dec_specified_repeats(Course $course)
5.x _CourseList.php _CourseList::dec_specified_repeats(Course $course, $bool_ignore_infinite_repeats = TRUE)

Go through the list and decrement the specified_repeats value for all instances of Course $course.

Parameters

Course $course:

File

classes/_CourseList.php, line 1905

Class

_CourseList

Code

function dec_specified_repeats(Course $course) 
 {
  // Go through the list, and decrement the specified_repeats
  // value for all instances of $course.
  for ($t = 0; $t < $this->count; $t++) 
   {
    $course2 = $this->array_list [$t];
    if ($course2->course_id == $course->course_id) 
     {
      $course2->specified_repeats--;
    }
  }

}