original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Initialises JavaScript to enable AJAX ratings on the provided page
  
  @param moodle_page $page
  @return true always returns true
docstring_tokens: Initialises JavaScript to enable AJAX ratings on the provided page