You are here

function course_generate_objects in Course 3.x

Same name and namespace in other branches
  1. 8.3 course.devel.inc \course_generate_objects()
  2. 8.2 course.devel.inc \course_generate_objects()
  3. 7.2 course.devel.inc \course_generate_objects()
  4. 7 course.devel.inc \course_generate_objects()

Generate Course objects.

Parameters

type $course:

type $object_type:

1 call to course_generate_objects()
course_generate in ./course.devel.inc
Generate random course data.

File

./course.devel.inc, line 138

Code

function course_generate_objects($node, $course_object_type) {
  list($module, $object_type) = explode('-', $course_object_type);
  $co = course_get_course_object($module, $object_type);
  $co
    ->setCourse($node
    ->id());
  $co
    ->save();
}