function _AdvisingScreen::mark_course_as_displayed

4.x _AdvisingScreen.php _AdvisingScreen::mark_course_as_displayed(Group $group, Course $course)
5.x _AdvisingScreen.php _AdvisingScreen::mark_course_as_displayed(Group $group, Course $course)

Find all instaces of a Course in a Group and mark as displayed.

Parameters

Group $group:

Course $course:

File

classes/_AdvisingScreen.php, line 2563

Class

_AdvisingScreen

Code

function mark_course_as_displayed(Group $group, Course $course) 
 {
  // Find all instances of $course in $group,
  // and mark as displayed.

  if ($obj_list = $group->list_courses->find_all_matches($course)) 
   {
    $course_list = CourseList::cast($obj_list);
    $course_list->mark_as_displayed();
  }
  // Now, go through all the course lists within each branch...
  $group->list_groups->reset_counter();
  while ($group->list_groups->has_more()) 
   {
    $g = $group->list_groups->get_next();
    if ($obj_list = $g->list_courses->find_all_matches($course)) 
     {

      $course_list = CourseList::cast($obj_list);
      $course_list->mark_as_displayed($semester_num);
    }
  }


}