Course
Hierarchy
Expanded class hierarchy of Course
Properties
Functions & methods
Name | Description |
---|---|
_Course::assign_display_status | This 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::equals | Convienience function. Simply compare the course_id of another course to $this to see if they are equal. |
_Course::equals_placeholder | Basically, 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_title | This function will correct capitalization problems in course titles. |
_Course::get_advised_hours | Returns 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_names | This function will return a CSV string of all the possible names for this course, in alphabetical order. |
_Course::get_catalog_hours | The 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_hours | Figure 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_points | Calculate the quality points for this course's grade and hours. |
_Course::get_term_description | Based on $this->term_id, returns a plain english description of the term. For example, 20061 would return "Spring of 2006". |
_Course::has_variable_hours | Simply returns TRUE if $this has variable hours. |
_Course::is_completed | Returns TRUE if the student has completed the course (and did not make a failing grade on it). |
_Course::load_course | Loads $this as a new course, based on course_id. |
_Course::load_course_from_data_string | 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_name | Load $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_data | 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 | Similar to load_descriptive_data(), this will load whatever we have for $this transfer course. |
_Course::meets_min_grade_requirement_of | Does $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_equals | This 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_id | Based on $this->term_id, set what catalog year should go with the course. |
_Course::to_data_string | This 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_string | This 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::__construct | The constructor for a Course object. |
_Course::__sleep | This 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