function FlightPath::assign_course_to_courses_added_list
Search API
7.x FlightPath.php | FlightPath::assign_course_to_courses_added_list($course_id, $var_hours = 0, $db_advised_courses_id = 0, $advised_term_id = 0) |
6.x FlightPath.php | FlightPath::assign_course_to_courses_added_list($course_id, $var_hours = 0, $db_advised_courses_id = 0, $advised_term_id = 0) |
1 call to FlightPath::assign_course_to_courses_added_list()
File
- classes/
FlightPath.php, line 2237
Class
Code
function assign_course_to_courses_added_list($course_id, $var_hours = 0, $db_advised_courses_id = 0, $advised_term_id = 0)
{
// Set the supplied course as "advised to take" in the degree plan's
// special added courses group, which is number -88.
$course = new Course($course_id, false, $this->db);
$course->bool_advised_to_take = true;
$course->assigned_to_semester_num = DegreePlan::SEMESTER_NUM_FOR_COURSES_ADDED;
//$course->assigned_to_group_id = -88;
$course->assigned_to_group_ids_array [DegreePlan::GROUP_ID_FOR_COURSES_ADDED] = DegreePlan::GROUP_ID_FOR_COURSES_ADDED;
$course->advised_hours = $var_hours;
$course->db_advised_courses_id = $db_advised_courses_id;
$course->advised_term_id = $advised_term_id;
if ($group = $this->degree_plan->find_group(DegreePlan::GROUP_ID_FOR_COURSES_ADDED))
{
$group->list_courses->add($course);
}
// Done!
}