public function add_message($message, $class="notifyproblem", $align='center') {
        global $SESSION;

        if (empty($SESSION->lesson_messages) || !is_array($SESSION->lesson_messages)) {
            $SESSION->lesson_messages = array();
            $SESSION->lesson_messages[$this->properties->id] = array();
        } else if (!array_key_exists($this->properties->id, $SESSION->lesson_messages)) {
            $SESSION->lesson_messages[$this->properties->id] = array();
        }

        $SESSION->lesson_messages[$this->properties->id][] = array($message, $class, $align);

        return true;
    }
public function add_message($message, $class="notifyproblem", $align='center') {
        global $SESSION;

        if (empty($SESSION->lesson_messages) || !is_array($SESSION->lesson_messages)) {
            $SESSION->lesson_messages = array();
            $SESSION->lesson_messages[$this->properties->id] = array();
        } else if (!array_key_exists($this->properties->id, $SESSION->lesson_messages)) {
            $SESSION->lesson_messages[$this->properties->id] = array();
        }

        $SESSION->lesson_messages[$this->properties->id][] = array($message, $class, $align);

        return true;
    }
public function add_message ( $ message , $ class = "notifyproblem" , $ align = 'center' ) { global $ SESSION ; if ( empty ( $ SESSION -> lesson_messages ) || ! is_array ( $ SESSION -> lesson_messages ) ) { $ SESSION -> lesson_messages = array ( ) ; $ SESSION -> lesson_messages [ $ this -> properties -> id ] = array ( ) ; } else if ( ! array_key_exists ( $ this -> properties -> id , $ SESSION -> lesson_messages ) ) { $ SESSION -> lesson_messages [ $ this -> properties -> id ] = array ( ) ; } $ SESSION -> lesson_messages [ $ this -> properties -> id ] [ ] = array ( $ message , $ class , $ align ) ; return true ; }
Sets a message against the session for this lesson that will displayed next
time the lesson processes messages

@param string $message
@param string $class
@param string $align
@return bool
Sets a message against the session for this lesson that will displayed next time the lesson processes messages