Course

Hierarchy

Expanded class hierarchy of Course

Properties

NameDescription
_Course::$advised_hours
_Course::$advised_term_id
_Course::$array_valid_names
_Course::$assigned_to_group_id
_Course::$bool_has_been_assigned
_Course::$bool_hide_grade
_Course::$bool_placeholder
_Course::$bool_substitution
_Course::$bool_substitution_split
_Course::$bool_taken
_Course::$bool_transfer
_Course::$bool_unselectable
_Course::$bool_use_draft
_Course::$course_list_fulfilled_by
_Course::$db_exclude
_Course::$db_group_requirement_id
_Course::$display_status
_Course::$min_grade
_Course::$min_hours
_Course::$random_id
_Course::$subject_id
_Course::$title_text
_Course::$transfer_eqv_text

Functions & methods

NameDescription
_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_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_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_quality_pointsCalculate the quality points for this course's grade and hours.
_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_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::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.

File

custom/classes/Course.php, line 2

View source
class Course extends _Course {


}