public function get_unique_id() {
        global $CFG;

        if (!is_null($this->uniqueid)) {
            return $this->uniqueid;
        }

        // Generate a unique id for this site, this model and this time splitting method, considering the last time
        // that the model target and indicators were updated.
        $ids = array($CFG->wwwroot, $CFG->prefix, $this->model->id, $this->model->version);
        $this->uniqueid = sha1(implode('$$', $ids));

        return $this->uniqueid;
    }
public function get_unique_id() {
        global $CFG;

        if (!is_null($this->uniqueid)) {
            return $this->uniqueid;
        }

        // Generate a unique id for this site, this model and this time splitting method, considering the last time
        // that the model target and indicators were updated.
        $ids = array($CFG->wwwroot, $CFG->prefix, $this->model->id, $this->model->version);
        $this->uniqueid = sha1(implode('$$', $ids));

        return $this->uniqueid;
    }
public function get_unique_id ( ) { global $ CFG ; if ( ! is_null ( $ this -> uniqueid ) ) { return $ this -> uniqueid ; } // Generate a unique id for this site, this model and this time splitting method, considering the last time // that the model target and indicators were updated. $ ids = array ( $ CFG -> wwwroot , $ CFG -> prefix , $ this -> model -> id , $ this -> model -> version ) ; $ this -> uniqueid = sha1 ( implode ( '$$' , $ ids ) ) ; return $ this -> uniqueid ; }
Returns a unique id for this model.

This id should be unique for this site.

@return string
Returns a unique id for this model .