function _FlightPath::split_requirements_by_substitutions
Search API
4.x _FlightPath.php | _FlightPath::split_requirements_by_substitutions() |
5.x _FlightPath.php | _FlightPath::split_requirements_by_substitutions() |
File
- classes/
_FlightPath.php, line 1512
Class
Code
function split_requirements_by_substitutions()
{
// Go through all the required courses on the degree plan,
// and if there is a partial substitution specified in the student's
// list of substitutions, then split that requirement into 2 courses,
// one with enough hours to satisfy the sub, and the remaining hours.
$degree_plan = $this->degree_plan;
$student = $this->student;
$student->list_substitutions->reset_counter();
while ($student->list_substitutions->has_more())
{
$substitution = $student->list_substitutions->get_next();
$course_requirement = $substitution->course_requirement;
$course_sub = $substitution->course_list_substitutions->get_first();
// Check to see if the courseSub's hours_awarded are less than the
// course_requirement's min hours...
if ($course_requirement->min_hours > $course_sub->hours_awarded)
{
// Meaning the original course requirement is not being
// fully satisfied by this substitution! The original
// course requirement has hours left over which must be
// fulfilled somehow.
$remaining_hours = $course_requirement->min_hours - $course_sub->hours_awarded;
// This means that the course requirement needs to be split.
// So, find this course in the degree plan.
$required_course_id = $course_requirement->course_id;
$required_group_id = $course_requirement->assigned_to_group_id;
$required_semester_num = $course_requirement->assigned_to_semester_num;
}
}
}