function _DegreePlan::add_semester_courses_added

4.x _DegreePlan.php _DegreePlan::add_semester_courses_added()
5.x _DegreePlan.php _DegreePlan::add_semester_courses_added()
1 call to _DegreePlan::add_semester_courses_added()

File

classes/_DegreePlan.php, line 568

Class

_DegreePlan

Code

function add_semester_courses_added() 
 {
  // The "Add a Course" box on screen is really just a
  // semester, with the number -88, with a single group,
  // also numbered -88.
  $semester_courses_added = new Semester(-88);
  $semester_courses_added->title = t("Courses Added by Advisor");

  // Now, we want to add the Add a Course group...
  $g = new Group();
  $g->group_id = -88;
  // Since it would take a long time during page load, we will
  // leave this empty of courses for now.  It doesn't matter anyway,
  // as we will not be checking this group for course membership
  // anyway.  We only need to load it in the popup.
  $g->hours_required = 99999; // Nearly infinite selections may be made.
  $g->assigned_to_semester_num = -88;

  $semester_courses_added->list_groups->add($g);

  $this->list_semesters->add($semester_courses_added);

  // Also, add it to the list of groups OUTSIDE of semesters.
  $this->list_groups->add($g);

}