function _Course::set_hours_awarded
Search API
5.x _Course.php | _Course::set_hours_awarded($degree_id = 0, $val) |
4 calls to _Course::set_hours_awarded()
- _Course::load_course_from_data_string in classes/
_Course.php - This will take a data string, as created by the function to_data_string(), and make $this object match the original object. It is a poor man's unserialize. See to_data_string()'s description for a fuller picture of what is going on.
- _Course::load_course_from_data_string_for_requirement_clone in classes/
_Course.php - This function uses load_course_from_data_string, but it removes any elements which might interfere with the course object then being used as a requirement. This is used specifically by the FlightPath object, when creating a clone of a repeatable course.
- _Course::load_descriptive_data in classes/
_Course.php - This function will load $this will all sorts of descriptive data from the database. For example, hours, title, description, etc.
- _Course::load_descriptive_transfer_data in classes/
_Course.php - Similar to load_descriptive_data(), this will load whatever we have for $this transfer course.
File
- classes/
_Course.php, line 297
Class
Code
function set_hours_awarded($degree_id = 0, $val) {
// If degree_id is zero, then use the course's currently req_by_degree_id.
if ($degree_id == 0) {
$degree_id = $this->req_by_degree_id;
}
$this->set_details_by_degree($degree_id, "hours_awarded", $val * 1); // *1 to force integer and to trim extra zeroes.
}