function course_clone_warning_messages in Course 6
Same name and namespace in other branches
- 8.3 includes/course.exporting.inc \course_clone_warning_messages()
- 8.2 includes/course.exporting.inc \course_clone_warning_messages()
- 7.2 includes/course.exporting.inc \course_clone_warning_messages()
- 7 includes/course.exporting.inc \course_clone_warning_messages()
- 3.x includes/course.exporting.inc \course_clone_warning_messages()
Show warning messages for a Course.
Parameters
Course $course:
2 calls to course_clone_warning_messages()
- course_clone_node_alter in includes/
course.exporting.inc - Implements hook_clone_node_alter().
- course_node_export_node_alter in includes/
course.exporting.inc - Implements hook_node_export_node_alter().
File
- includes/
course.exporting.inc, line 20
Code
function course_clone_warning_messages($course) {
$messages = array();
foreach ($course
->getObjects() as $courseObject) {
$warning = $courseObject
->getCloneAbility();
if (is_string($warning)) {
$messages[] = $warning;
}
}
if ($messages) {
drupal_set_message(filter_xss_admin(theme('item_list', $messages, t('Cloning issues')), 'warning'));
}
}