function DegreePlan::get_progress_quality_points
Search API
7.x DegreePlan.php | DegreePlan::get_progress_quality_points($requirement_type = "", $bool_exclude_all_transfer_credits = FALSE, $req_by_degree_id = 0) |
6.x DegreePlan.php | DegreePlan::get_progress_quality_points($requirement_type = "", $bool_exclude_all_transfer_credits = FALSE, $req_by_degree_id = 0) |
Similar to get_progress_hours, this will return back the quality points a student has earned towards this degree. It can then be used to calculate GPA.
Parameters
unknown_type $requirement_type:
unknown_type $bool_required_hours_only:
Return value
unknown
1 call to DegreePlan::get_progress_quality_points()
- DegreePlan::calculate_progress_quality_points in classes/
DegreePlan.php - Calculate the quality points of our completed courses, so we can use that to figure out GPA.
File
- classes/
DegreePlan.php, line 403
Class
Code
function get_progress_quality_points($requirement_type = "", $bool_exclude_all_transfer_credits = FALSE, $req_by_degree_id = 0) {
// Returns the number of hours required (or fulfilled) in a degree plan
// for courses & groups with the specified requirement_type.
// ex: "m", "s", etc. leave blank for ALL required hours.
// if boolRequiredHours is FALSE, then we will only look for the courses
// which got fulfilled.
if ($requirement_type == "degree") {
$requirement_type = "";
}
$points = 0;
$this->list_semesters->reset_counter();
while ($this->list_semesters->has_more())
{
$sem = $this->list_semesters->get_next();
$p = $sem->list_courses->count_credit_quality_points($requirement_type, true, true, $bool_exclude_all_transfer_credits, $req_by_degree_id);
$points = $points + $p;
}
// Also, add in groups matching this requirement type.
$this->list_groups->reset_counter();
while ($this->list_groups->has_more())
{
$g = $this->list_groups->get_next();
if ($g->group_id < 0)
{ // Skip Add a course group.
continue;
}
// Make sure the group doesn't have a type of 'x' assigned to it, which means we should
// skip it.
if ($g->requirement_type == 'x') {
continue;
}
// if req_by_degree_id is set, make sure the group belongs to that degree id!
if ($req_by_degree_id != 0 && $g->req_by_degree_id != $req_by_degree_id) {
continue;
}
$g_points = $g->get_fulfilled_quality_points(TRUE, -1, TRUE, TRUE, $requirement_type, $bool_exclude_all_transfer_credits);
$points = $points + $g_points;
}
return $points;
}