Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

   1  <?php
   2  //  Copyright (c) 2009 Facebook
   3  //
   4  //  Licensed under the Apache License, Version 2.0 (the "License");
   5  //  you may not use this file except in compliance with the License.
   6  //  You may obtain a copy of the License at
   7  //
   8  //      http://www.apache.org/licenses/LICENSE-2.0
   9  //
  10  //  Unless required by applicable law or agreed to in writing, software
  11  //  distributed under the License is distributed on an "AS IS" BASIS,
  12  //  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13  //  See the License for the specific language governing permissions and
  14  //  limitations under the License.
  15  //
  16  
  17  /**
  18   * AJAX endpoint for XHProf function name typeahead.
  19   *
  20   * @author(s)  Kannan Muthukkaruppan
  21   *             Changhao Jiang
  22   */
  23  
  24  // Start moodle modification: moodleize this script.
  25  require_once(dirname(dirname(dirname(dirname(__FILE__)))).'/config.php');
  26  require_once($CFG->libdir . '/xhprof/xhprof_moodle.php');
  27  require_login();
  28  require_capability('moodle/site:config', context_system::instance());
  29  \core\session\manager::write_close();
  30  // End moodle modification.
  31  
  32  // by default assume that xhprof_html & xhprof_lib directories
  33  // are at the same level.
  34  $GLOBALS['XHPROF_LIB_ROOT'] = dirname(__FILE__) . '/../xhprof_lib';
  35  
  36  require_once $GLOBALS['XHPROF_LIB_ROOT'].'/display/xhprof.php';
  37  
  38  // Start moodle modification: use own XHProfRuns implementation.
  39  // $xhprof_runs_impl = new XHProfRuns_Default();
  40  $xhprof_runs_impl = new moodle_xhprofrun();
  41  // End moodle modification.
  42  
  43  require_once $GLOBALS['XHPROF_LIB_ROOT'].'/display/typeahead_common.php';