public function cron_overdue_warning($cronoverdue) {
        global $CFG;
        if (!$cronoverdue) {
            return '';
        }

        if (empty($CFG->cronclionly)) {
            $url = new moodle_url('/admin/cron.php');
            if (!empty($CFG->cronremotepassword)) {
                $url = new moodle_url('/admin/cron.php', array('password' => $CFG->cronremotepassword));
            }

            return $this->warning(get_string('cronwarning', 'admin', $url->out()) . '&nbsp;' .
                    $this->help_icon('cron', 'admin'));
        }

        // $CFG->cronclionly is not empty: cron can run only from CLI.
        return $this->warning(get_string('cronwarningcli', 'admin') . '&nbsp;' .
                $this->help_icon('cron', 'admin'));
    }
public function cron_overdue_warning($cronoverdue) {
        global $CFG;
        if (!$cronoverdue) {
            return '';
        }

        if (empty($CFG->cronclionly)) {
            $url = new moodle_url('/admin/cron.php');
            if (!empty($CFG->cronremotepassword)) {
                $url = new moodle_url('/admin/cron.php', array('password' => $CFG->cronremotepassword));
            }

            return $this->warning(get_string('cronwarning', 'admin', $url->out()) . '&nbsp;' .
                    $this->help_icon('cron', 'admin'));
        }

        // $CFG->cronclionly is not empty: cron can run only from CLI.
        return $this->warning(get_string('cronwarningcli', 'admin') . '&nbsp;' .
                $this->help_icon('cron', 'admin'));
    }
public function cron_overdue_warning ( $ cronoverdue ) { global $ CFG ; if ( ! $ cronoverdue ) { return '' ; } if ( empty ( $ CFG -> cronclionly ) ) { $ url = new moodle_url ( '/admin/cron.php' ) ; if ( ! empty ( $ CFG -> cronremotepassword ) ) { $ url = new moodle_url ( '/admin/cron.php' , array ( 'password' => $ CFG -> cronremotepassword ) ) ; } return $ this -> warning ( get_string ( 'cronwarning' , 'admin' , $ url -> out ( ) ) . '&nbsp;' . $ this -> help_icon ( 'cron' , 'admin' ) ) ; } // $CFG->cronclionly is not empty: cron can run only from CLI. return $ this -> warning ( get_string ( 'cronwarningcli' , 'admin' ) . '&nbsp;' . $ this -> help_icon ( 'cron' , 'admin' ) ) ; }
Render an appropriate message if cron has not been run recently.
@param bool $cronoverdue
@return string HTML to output.
Render an appropriate message if cron has not been run recently .