/** * Returns the information about the ajax support in the given source format * * This function calls function callback_FORMATNAME_ajax_support() if it exists * * The returned object's property (boolean)capable indicates that * the course format supports Moodle course ajax features. * * @return stdClass */ public function supports_ajax() { // set up default values $ajaxsupport = parent::supports_ajax(); // get the information from the course format library $featurefunction = 'callback_' . $this->format . '_ajax_support'; if (function_exists($featurefunction)) { $formatsupport = $featurefunction(); if (isset($formatsupport->capable)) { $ajaxsupport->capable = $formatsupport->capable; } } return $ajaxsupport; }