public function add_to_log($action = '', $info = '', $url='', $return = false) {
        global $USER;

        $fullurl = 'view.php?id=' . $this->get_course_module()->id;
        if ($url != '') {
            $fullurl .= '&' . $url;
        }

        $args = array(
            $this->get_course()->id,
            'assign',
            $action,
            $fullurl,
            $info,
            $this->get_course_module()->id
        );

        if ($return) {
            // We only need to call debugging when returning a value. This is because the call to
            // call_user_func_array('add_to_log', $args) will trigger a debugging message of it's own.
            debugging('The mod_assign add_to_log() function is now deprecated.', DEBUG_DEVELOPER);
            return $args;
        }
        call_user_func_array('add_to_log', $args);
    }
public function add_to_log($action = '', $info = '', $url='', $return = false) {
        global $USER;

        $fullurl = 'view.php?id=' . $this->get_course_module()->id;
        if ($url != '') {
            $fullurl .= '&' . $url;
        }

        $args = array(
            $this->get_course()->id,
            'assign',
            $action,
            $fullurl,
            $info,
            $this->get_course_module()->id
        );

        if ($return) {
            // We only need to call debugging when returning a value. This is because the call to
            // call_user_func_array('add_to_log', $args) will trigger a debugging message of it's own.
            debugging('The mod_assign add_to_log() function is now deprecated.', DEBUG_DEVELOPER);
            return $args;
        }
        call_user_func_array('add_to_log', $args);
    }
public function add_to_log ( $ action = '' , $ info = '' , $ url = '' , $ return = false ) { global $ USER ; $ fullurl = 'view.php?id=' . $ this -> get_course_module ( ) -> id ; if ( $ url != '' ) { $ fullurl .= '&' . $ url ; } $ args = array ( $ this -> get_course ( ) -> id , 'assign' , $ action , $ fullurl , $ info , $ this -> get_course_module ( ) -> id ) ; if ( $ return ) { // We only need to call debugging when returning a value. This is because the call to // call_user_func_array('add_to_log', $args) will trigger a debugging message of it's own. debugging ( 'The mod_assign add_to_log() function is now deprecated.' , DEBUG_DEVELOPER ) ; return $ args ; } call_user_func_array ( 'add_to_log' , $ args ) ; }
Util function to add a message to the log.

@deprecated since 2.7 - Use new events system instead.
(see http://docs.moodle.org/dev/Migrating_logging_calls_in_plugins).

@param string $action The current action
@param string $info A detailed description of the change. But no more than 255 characters.
@param string $url The url to the assign module instance.
@param bool $return If true, returns the arguments, else adds to log. The purpose of this is to
retrieve the arguments to use them with the new event system (Event 2).
@return void|array
Util function to add a message to the log .