You are here

function CourseObjectNode::getWarnings in Course 7

Same name and namespace in other branches
  1. 6 includes/course_object.core.inc \CourseObjectNode::getWarnings()
  2. 7.2 includes/CourseObjectNode.inc \CourseObjectNode::getWarnings()

Show a warning if this object has an instance, but the node does not exist.

Overrides CourseHandler::getWarnings

2 calls to CourseObjectNode::getWarnings()
CourseObjectQuiz::getWarnings in modules/course_quiz/course_quiz.classes.inc
Let the user know if they have a Quiz without questions.
CourseObjectWebform::getWarnings in modules/course_webform/course_webform.classes.inc
Show a warning if this object has an instance, but the node does not exist.
2 methods override CourseObjectNode::getWarnings()
CourseObjectQuiz::getWarnings in modules/course_quiz/course_quiz.classes.inc
Let the user know if they have a Quiz without questions.
CourseObjectWebform::getWarnings in modules/course_webform/course_webform.classes.inc
Show a warning if this object has an instance, but the node does not exist.

File

includes/CourseObjectNode.inc, line 431

Class

CourseObjectNode
A course object that uses a node as a base.

Code

function getWarnings() {
  $warnings = parent::getWarnings();
  if ($this
    ->getInstanceId() && !$this
    ->getNode()) {
    $warnings[] = t('The content associated with this object has been deleted.<br/>Saving the course will create new content from the object settings.');
  }
  return $warnings;
}