function CourseObject::getCourse in Course 6
Same name and namespace in other branches
- 7.2 includes/CourseObject.inc \CourseObject::getCourse()
- 7 includes/CourseObject.inc \CourseObject::getCourse()
Get the Course that contains this CourseObject.
Return value
1 call to CourseObject::getCourse()
- CourseObject::access in includes/
course_object.core.inc - Access functionality for course objects.
File
- includes/
course_object.core.inc, line 720
Class
- CourseObject
- Parent abstract base class of all course objects.
Code
function getCourse() {
if (!$this->course) {
$nid = $this
->getCourseNid();
if ($nid) {
$this->course = new Course(node_load($nid), $this->user);
}
}
return $this->course;
}