public function CourseObject::setCourse in Course 7
Same name and namespace in other branches
- 6 includes/course_object.core.inc \CourseObject::setCourse()
- 7.2 includes/CourseObject.inc \CourseObject::setCourse()
Set the Course for this CourseObject.
Parameters
Course|int $course: A Course or node ID.
Return value
File
- includes/
CourseObject.inc, line 759
Class
- CourseObject
- Parent abstract base class of all course objects.
Code
public function setCourse($course) {
if (is_numeric($course)) {
$this
->setOption('nid', $course);
}
else {
$this
->setOption('nid', $course
->getNode()->nid);
}
return $this;
}