|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 // Copyright (c) 2009 Facebook 00003 // 00004 // Licensed under the Apache License, Version 2.0 (the "License"); 00005 // you may not use this file except in compliance with the License. 00006 // You may obtain a copy of the License at 00007 // 00008 // http://www.apache.org/licenses/LICENSE-2.0 00009 // 00010 // Unless required by applicable law or agreed to in writing, software 00011 // distributed under the License is distributed on an "AS IS" BASIS, 00012 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 // See the License for the specific language governing permissions and 00014 // limitations under the License. 00015 // 00016 00024 // start moodle modification: moodleize this script 00025 require_once(dirname(dirname(dirname(dirname(__FILE__)))).'/config.php'); 00026 require_once($CFG->libdir . '/xhprof/xhprof_moodle.php'); 00027 require_login(); 00028 require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)); 00029 // end moodle modification 00030 00031 // by default assume that xhprof_html & xhprof_lib directories 00032 // are at the same level. 00033 $GLOBALS['XHPROF_LIB_ROOT'] = dirname(__FILE__) . '/../xhprof_lib'; 00034 00035 require_once $GLOBALS['XHPROF_LIB_ROOT'].'/display/xhprof.php'; 00036 00037 // start moodle modification: use own XHProfRuns implementation 00038 //$xhprof_runs_impl = new XHProfRuns_Default(); 00039 require_once($GLOBALS['XHPROF_LIB_ROOT'].'/../xhprof_moodle.php'); 00040 $xhprof_runs_impl = new moodle_xhprofrun(); 00041 // end moodle modification 00042 00043 require_once $GLOBALS['XHPROF_LIB_ROOT'].'/display/typeahead_common.php';