public function CourseHandler::setAccessMessage in Course 7
Same name and namespace in other branches
- 6 includes/course.core.inc \CourseHandler::setAccessMessage()
- 7.2 includes/CourseHandler.inc \CourseHandler::setAccessMessage()
Set an access message to be displayed along with the course object when it is in the outline. For example, "This activity will open on XYZ" or "Please complete Step 1 to take this activity."
Parameters
string $key: Message key.
string $message: Message text.
1 call to CourseHandler::setAccessMessage()
- CourseHandler::getAccessMessages in includes/
CourseHandler.inc - Get an array of access messages.
File
- includes/
CourseHandler.inc, line 199
Class
- CourseHandler
- Master class for anything Course related.
Code
public function setAccessMessage($key = NULL, $message = NULL) {
if ($key == NULL) {
return $this->accessMessages;
}
if (empty($message)) {
unset($this->accessMessages[$key]);
}
else {
$this->accessMessages[$key] = $message;
}
}