function _DegreePlan::get_progress_quality_points
Search API
4.x _DegreePlan.php | _DegreePlan::get_progress_quality_points($requirement_type = "") |
5.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 186
Class
Code
function get_progress_quality_points($requirement_type = "") {
// 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.
$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);
$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;
}
if ($g->requirement_type == $requirement_type || $requirement_type == "") {
//fpm("$requirement_type - group $g->title - $g_points");
$g_points = $g->get_fulfilled_quality_points(TRUE, -1, TRUE, TRUE);
$points = $points + $g_points;
}
}
return $points;
}