protected function registration_warning($registered) {

        if (!$registered && site_is_public()) {
            if (has_capability('moodle/site:config', context_system::instance())) {
                $registerbutton = $this->single_button(new moodle_url('/admin/registration/index.php'),
                    get_string('register', 'admin'));
                $str = 'registrationwarning';
            } else {
                $registerbutton = '';
                $str = 'registrationwarningcontactadmin';
            }

            return $this->warning( get_string($str, 'admin')
                    . '&nbsp;' . $this->help_icon('registration', 'admin') . $registerbutton ,
                'error alert alert-danger');
        }

        return '';
    }
protected function registration_warning($registered) {

        if (!$registered && site_is_public()) {
            if (has_capability('moodle/site:config', context_system::instance())) {
                $registerbutton = $this->single_button(new moodle_url('/admin/registration/index.php'),
                    get_string('register', 'admin'));
                $str = 'registrationwarning';
            } else {
                $registerbutton = '';
                $str = 'registrationwarningcontactadmin';
            }

            return $this->warning( get_string($str, 'admin')
                    . '&nbsp;' . $this->help_icon('registration', 'admin') . $registerbutton ,
                'error alert alert-danger');
        }

        return '';
    }
protected function registration_warning ( $ registered ) { if ( ! $ registered && site_is_public ( ) ) { if ( has_capability ( 'moodle/site:config' , context_system :: instance ( ) ) ) { $ registerbutton = $ this -> single_button ( new moodle_url ( '/admin/registration/index.php' ) , get_string ( 'register' , 'admin' ) ) ; $ str = 'registrationwarning' ; } else { $ registerbutton = '' ; $ str = 'registrationwarningcontactadmin' ; } return $ this -> warning ( get_string ( $ str , 'admin' ) . '&nbsp;' . $ this -> help_icon ( 'registration' , 'admin' ) . $ registerbutton , 'error alert alert-danger' ) ; } return '' ; }
Display a warning about not being registered on Moodle.org if necesary.

@param boolean $registered true if the site is registered on Moodle.org
@return string HTML to output.
Display a warning about not being registered on Moodle . org if necesary .