public function initialise_rating_javascript(moodle_page $page) {
        global $CFG;

        // Only needs to be initialized once.
        static $done = false;
        if ($done) {
            return true;
        }

        $page->requires->js_init_call('M.core_rating.init');
        $done = true;

        return true;
    }
public function initialise_rating_javascript(moodle_page $page) {
        global $CFG;

        // Only needs to be initialized once.
        static $done = false;
        if ($done) {
            return true;
        }

        $page->requires->js_init_call('M.core_rating.init');
        $done = true;

        return true;
    }
public function initialise_rating_javascript ( moodle_page $ page ) { global $ CFG ; // Only needs to be initialized once. static $ done = false ; if ( $ done ) { return true ; } $ page -> requires -> js_init_call ( 'M.core_rating.init' ) ; $ done = true ; return true ; }
Initialises JavaScript to enable AJAX ratings on the provided page

@param moodle_page $page
@return true always returns true
Initialises JavaScript to enable AJAX ratings on the provided page