function course_node_export_node_alter in Course 7
Same name and namespace in other branches
- 8.3 includes/course.exporting.inc \course_node_export_node_alter()
- 8.2 includes/course.exporting.inc \course_node_export_node_alter()
- 6 includes/course.exporting.inc \course_node_export_node_alter()
- 7.2 includes/course.exporting.inc \course_node_export_node_alter()
- 3.x includes/course.exporting.inc \course_node_export_node_alter()
Implements hook_node_export_node_alter().
Allow course objects to freeze data into the export.
File
- includes/
course.exporting.inc, line 45
Code
function course_node_export_node_alter($node, $original_node, $op) {
if ($op == 'export') {
if (course_node_is_course($node)) {
$course = course_get_course($node);
if (arg(2) == 'node_export') {
course_clone_warning_messages($course);
foreach ($course
->getObjects() as $object) {
if ($object
->getCloneAbility() !== FALSE) {
$node->course['objects'][$object
->getId()]->freeze = $object
->freeze();
}
}
}
}
}
}