1. 5.x custom/classes/Course.php Course
  2. 4.x custom/classes/Course.php Course


Expanded class hierarchy of Course



Functions & methods

_Course::assign_display_statusThis will assign the $this->display_status string based on the grade the student has made on the course. The display_status is used by other display functions to decide what color the course should show up as.
_Course::equalsConvienience function. Simply compare the course_id of another course to $this to see if they are equal.
_Course::equals_placeholderBasically, this is a comparator function that will return true if $this equals many of the attributes of $course_c. Useful for seeing if $this is an "instance of" a particular course, but not necessairily the course that the student took. …
_Course::fix_titleThis function will correct capitalization problems in course titles.
_Course::get_advised_hoursReturns how many hours this course has been advised for. This is used with courses which have variable hours. If the course has not been advised for any particular number of hours, then it's min_hours are returned.
_Course::get_all_namesThis function will return a CSV string of all the possible names for this course, in alphabetical order.
_Course::get_bool_assigned_to_group_idReturn TRUE or FALSE if this this course was ever assigned to the supplied group_id. if $group_id == -1, then return TRUE if it was assigned to ANY group.
_Course::get_bool_exclude_repeatReturns TRUE or FALSE if this course has been marked as exclude_repeat. Specify a degree_id to be more specific. Use -1 to mean "ANY" degree?
_Course::get_bool_substitutionSimilar to the functions regarding display, these will say if this course has been used in a substitution for a particular degree.
_Course::get_catalog_hoursThe function returns either an integer of the the number of hours the course is worth, or, a range in the form of min-max (if the course has variable hours)
_Course::get_count_details_by_degreeReturn back a count from ANY degree for this property name.
_Course::get_course_substitutionSimilar to the functions regarding display-- get the course substitution based on supplied degree_id. Set degree_id to -1 to just get the first one, if available.
_Course::get_degree_details_data_stringReturns back an array from our details_by_degree array, for a given property name, like: $arr[DEGREE_ID] = $val Useful in the to_data_string function
_Course::get_first_assigned_to_group_idReturn the first element in our assigned_to_group_ids_array, or FALSE
_Course::get_first_assigned_to_group_id_from_degree_idSimilar to get_first_sassigned_to_group_id, except this time we want to the first group_id that "belongs" to a certain degree.
_Course::get_first_value_from_any_degreeGoes through the details_by_degree array and returns the first valid value for the supplied key, any degree., or return NULL if not found.
_Course::get_has_been_displayedReturns TRUE or FALSE if this course has been displayed. Specify a degree_id to be more specific. Use -1 to mean "ANY" degree?
_Course::get_hoursFigure out the number of hours this particular instance of the course is worth. In the case of variable hours, it will return the number of hours selected. If that does not exist, it will return the MIN HOURS.
_Course::get_hours_awardedIf the boolean is set, it means if the supplied degree_id isn't set, then use the first found value.
_Course::get_quality_pointsCalculate the quality points for this course's grade and hours.
_Course::get_substitution_hoursSimilar to the functions regarding display-- get the course substitution based on supplied degree_id. Set degree_id to -1 to just get the first one, if available.
_Course::get_term_descriptionBased on $this->term_id, returns a plain english description of the term. For example, 20061 would return "Spring of 2006".
_Course::has_variable_hoursSimply returns TRUE if $this has variable hours.
_Course::is_completedReturns TRUE if the student has completed the course (and did not make a failing grade on it).
_Course::load_courseLoads $this as a new course, based on course_id.
_Course::load_course_from_data_stringThis 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_cloneThis 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_course_from_nameLoad $this as a new course based on the subject_id and course_num, instead of the course_id. This is a useful function for when you know a subject_id and course_num, but not course_id (for example, if it comes from human input).
_Course::load_descriptive_dataThis function will load $this will all sorts of descriptive data from the database. For example, hours, title, description, etc.
_Course::load_descriptive_transfer_dataSimilar to load_descriptive_data(), this will load whatever we have for $this transfer course.
_Course::meets_min_grade_requirement_ofDoes $this meed the minimum grade requirement of the supplied course requirement? You may specify either a Course object, or just enter the min_grade in the mGrade variable.
_Course::name_equalsThis function is used for comparing a course name to the subject_id and course_num of $this. We expect a space between the subject_id and CourseNum in $str.
_Course::set_catalog_year_from_term_idBased on $this->term_id, set what catalog year should go with the course.
_Course::set_degree_details_from_data_arrayThis is the reverse function of:
_Course::set_details_by_degreeConvenience function to set a value into our details_by_degree_array.
_Course::set_has_been_displayedCounterpart to get_has_been_displayed.
_Course::to_data_stringThis function will create a "data string" of the course. Think of it as a poor man's serialize. I can't actually use serialize, as I have to call this for every course on the screen, and the page load time was too long when using…
_Course::to_stringThis is the to_string method for Course. Because we want to pass it values, we are not using the magic method of "__to_string". So, to use, invoke this method directly. Ex:
_Course::__constructThe constructor for a Course object.
_Course::__sleepThis is the magic method __sleep(). PHP will call this method any time this object is being serialized. It is supposed to return an array of all the variables which need to be serialized.




custom/classes/Course.php, line 2

View source
class Course extends _Course {