Merge branch 'w28_MDL-34175_m24_admin' of git://github.com/skodak/moodle

This commit is contained in:
Sam Hemelryk 2012-07-10 12:43:48 +12:00
commit 1ef3f066ee
10 changed files with 20 additions and 14 deletions

View File

@ -29,7 +29,7 @@ if (isset($CFG->mnet_dispatcher_mode) and $CFG->mnet_dispatcher_mode !== 'off')
new admin_externalpage(
'mnetpeer' . $host->id,
$host->name,
$CFG->wwwroot . '/admin/mnet/peers.php?step=update&hostid=' . $host->id,
$CFG->wwwroot . '/'.$CFG->admin.'/mnet/peers.php?step=update&hostid=' . $host->id,
'moodle/site:config'
)
);

View File

@ -26,9 +26,9 @@ define('NO_OUTPUT_BUFFERING', true);
require_once(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/locallib.php');
require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/upgradableassignmentstable.php');
require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/upgradableassignmentsbatchform.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/upgradableassignmentstable.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/upgradableassignmentsbatchform.php');
require_sesskey();

View File

@ -35,7 +35,7 @@
require_once(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/locallib.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
// admin_externalpage_setup calls require_login and checks moodle/site:config
admin_externalpage_setup('assignmentupgrade');

View File

@ -24,10 +24,10 @@
require_once(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/locallib.php');
require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/upgradableassignmentstable.php');
require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/upgradableassignmentsbatchform.php');
require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/paginationform.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/upgradableassignmentstable.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/upgradableassignmentsbatchform.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/paginationform.php');
// admin_externalpage_setup calls require_login and checks moodle/site:config
admin_externalpage_setup('assignmentupgrade', '', array(), tool_assignmentupgrade_url('listnotupgraded'));

View File

@ -24,7 +24,7 @@
require_once(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/locallib.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
require_sesskey();

View File

@ -24,7 +24,7 @@
require_once(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/locallib.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
require_sesskey();

View File

@ -142,7 +142,7 @@ if (isset($script)) {
// The flexitable that will root listings
$table = new xhprof_table_sql('profiling-list-table');
$baseurl = $CFG->wwwroot . '/admin/tool/profiling/index.php';
$baseurl = $CFG->wwwroot . '/'.$CFG->admin.'/tool/profiling/index.php';
// Check if we are listing all or some URL ones
$sqlconditions = '';

View File

@ -468,7 +468,7 @@ class core_renderer extends renderer_base {
$link= '<a title="' . $title . '" href="' . $url . '">' . $txt . '</a>';
$output .= '<div class="profilingfooter">' . $link . '</div>';
}
$output .= '<div class="purgecaches"><a href="'.$CFG->wwwroot.'/admin/purgecaches.php?confirm=1&amp;sesskey='.sesskey().'">'.get_string('purgecaches', 'admin').'</a></div>';
$output .= '<div class="purgecaches"><a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/purgecaches.php?confirm=1&amp;sesskey='.sesskey().'">'.get_string('purgecaches', 'admin').'</a></div>';
}
if (!empty($CFG->debugvalidators)) {
// NOTE: this is not a nice hack, $PAGE->url is not always accurate and $FULLME neither, it is not a bug if it fails. --skodak

View File

@ -399,6 +399,12 @@ class page_requirements_manager {
if ($url instanceof moodle_url) {
return $url;
} else if (strpos($url, '/') === 0) {
// Fix the admin links if needed.
if ($CFG->admin !== 'admin') {
if (strpos($url, "/admin/") === 0) {
$url = preg_replace("|^/admin/|", "/$CFG->admin/", $url);
}
}
if (debugging()) {
// check file existence only when in debug mode
if (!file_exists($CFG->dirroot . strtok($url, '?'))) {

View File

@ -106,7 +106,7 @@ if ($data = $form->get_data()) {
}
$PAGE->set_title("$SITE->shortname: " . get_string('toolsetup', 'lti'));
$PAGE->navbar->add(get_string('lti_administration', 'lti'), $CFG->wwwroot.'/admin/settings.php?section=modsettinglti');
$PAGE->navbar->add(get_string('lti_administration', 'lti'), $CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section=modsettinglti');
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('toolsetup', 'lti'));