coverted /admin/ to proper /$CFG->admin/ in paths

This commit is contained in:
skodak
2006-09-26 21:10:14 +00:00
parent eee90c06b8
commit 6859360cd4
17 changed files with 29 additions and 30 deletions
+1 -1
View File
@@ -524,7 +524,7 @@
if (optional_param('dbmigrate')) { // ??? Is this actually used?
print_simple_box_start('center','60%');
require_once($CFG->dirroot.'/admin/utfdbmigrate.php');
require_once($CFG->dirroot.'/'.$CFG->admin.'/utfdbmigrate.php');
db_migrate2utf8();
print_simple_box_end();
}
+3 -3
View File
@@ -1,11 +1,11 @@
<?php
// this page deals with the 2 tabs for manage.php and grant.php
$toprow[] = new tabobject('manage', $CFG->wwwroot.'/admin/roles/manage.php', get_string('manageroles', 'role'));
$toprow[] = new tabobject('manage', $CFG->wwwroot.'/'.$CFG->admin.'/roles/manage.php', get_string('manageroles', 'role'));
$toprow[] = new tabobject('allowassign', $CFG->wwwroot.'/admin/roles/allowassign.php', get_string('allowassign', 'role'));
$toprow[] = new tabobject('allowassign', $CFG->wwwroot.'/'.$CFG->admin.'/roles/allowassign.php', get_string('allowassign', 'role'));
$toprow[] = new tabobject('allowoverride', $CFG->wwwroot.'/admin/roles/allowoverride.php', get_string('allowoverride', 'role'));
$toprow[] = new tabobject('allowoverride', $CFG->wwwroot.'/'.$CFG->admin.'/roles/allowoverride.php', get_string('allowoverride', 'role'));
$tabs = array($toprow);
+2 -2
View File
@@ -64,11 +64,11 @@ if ($data = data_submitted()) {
case 'site':
redirect("$CFG->wwwroot/");
case 'admin':
redirect("$CFG->wwwroot/admin/");
redirect("$CFG->wwwroot/$CFG->admin/");
default:
// following redirect should display confirmation message because it redirects
// to the same page, user might not know if save button worked
redirect("$CFG->wwwroot/admin/settings.php?section=" . $PAGE->section, get_string('changessaved'),2);
redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=" . $PAGE->section, get_string('changessaved'),2);
}
} else {
error(get_string('errorwithsettings', 'admin') . ' <br />' . $errors);
+1 -1
View File
@@ -5,7 +5,7 @@
$ADMIN->add('courses', new admin_externalpage('coursemgmt', get_string('coursemgmt', 'admin'), $CFG->wwwroot . '/course/index.php?categoryedit=on'));
$ADMIN->add('courses', new admin_externalpage('enrolment', get_string('enrolments'), $CFG->wwwroot . '/admin/enrol.php'));
$ADMIN->add('courses', new admin_externalpage('enrolment', get_string('enrolments'), $CFG->wwwroot . '/'.$CFG->admin.'/enrol.php'));
// "courserequests" settingpage
$temp = new admin_settingpage('courserequest', get_string('courserequest'));
+1 -1
View File
@@ -102,7 +102,7 @@
/// Save the original one to add it from ours. Global too! :-(
global $standard_javascript;
$standard_javascript = $CFG->javascript; // Save original javascript file
$CFG->javascript = $CFG->dirroot.'/admin/xmldb/javascript.php'; //Use our custom javascript code
$CFG->javascript = $CFG->dirroot.'/'.$CFG->admin.'/xmldb/javascript.php'; //Use our custom javascript code
/// Go with standard admin header
admin_externalpage_print_header($adminroot);
print_heading($xmldb_action->getTitle());
+4 -4
View File
@@ -39,15 +39,15 @@
$postaction = optional_param('postaction', '', PARAM_ALPHAEXT);
/// If the js exists, load it
if ($action) {
$file = $CFG->dirroot . '/admin/xmldb/actions/' . $action . '/' . $action . '.js';
$wwwfile = $CFG->wwwroot . '/admin/xmldb/actions/' . $action . '/' . $action . '.js';
$file = $CFG->dirroot . '/'.$CFG->admin.'/xmldb/actions/' . $action . '/' . $action . '.js';
$wwwfile = $CFG->wwwroot . '/'.$CFG->admin.'/xmldb/actions/' . $action . '/' . $action . '.js';
if (file_exists($file) && is_readable($file)) {
echo '<script language="JavaScript" type="text/javascript" src="' . $wwwfile . '"></script>' . "\n";
} else {
/// Try to load the postaction javascript if exists
if ($postaction) {
$file = $CFG->dirroot . '/admin/xmldb/actions/' . $postaction . '/' . $postaction . '.js';
$wwwfile = $CFG->wwwroot . '/admin/xmldb/actions/' . $postaction . '/' . $postaction . '.js';
$file = $CFG->dirroot . '/'.$CFG->admin.'/xmldb/actions/' . $postaction . '/' . $postaction . '.js';
$wwwfile = $CFG->wwwroot . '/'.$CFG->admin.'/xmldb/actions/' . $postaction . '/' . $postaction . '.js';
if (file_exists($file) && is_readable($file)) {
echo '<script language="JavaScript" type="text/javascript" src="' . $wwwfile . '"></script>' . "\n";
}
+1 -1
View File
@@ -58,7 +58,7 @@ class block_admin extends block_list {
/// Assign roles to the course
if (has_capability('moodle/role:assign', $context)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/admin/roles/assign.php?contextid='.$context->id.'">'.get_string('assignroles', 'role').'</a>';
$this->content->items[]='<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$context->id.'">'.get_string('assignroles', 'role').'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/roles.gif" alt="" />';
}
+1 -1
View File
@@ -357,7 +357,7 @@ class block_base {
$script = $page->url_get_full(array('instanceid' => $this->instance->id, 'sesskey' => $USER->sesskey));
// place holder for roles button
$movebuttons .= '<a class="icon roles" title="'. $this->str->assignroles .'" href="'.$CFG->wwwroot.'/admin/roles/assign.php?contextid='.$blockcontext->id.'">' .
$movebuttons .= '<a class="icon roles" title="'. $this->str->assignroles .'" href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$blockcontext->id.'">' .
'<img src="'.$CFG->pixpath.'/i/roles.gif" alt="'.$this->str->assignroles.'" /></a>';
$movebuttons .= '<a class="icon hide" title="'. $title .'" href="'.$script.'&amp;blockaction=toggle">' .
+1 -1
View File
@@ -107,7 +107,7 @@
}
/// Print link to roles
print('<a href="'.$CFG->wwwroot.'/admin/roles/assign.php?contextid='.$context->id.'">'.get_string('roles').'</a>');
print('<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$context->id.'">'.get_string('roles').'</a>');
/// Print the category selector
+1 -1
View File
@@ -249,7 +249,7 @@
redirect($CFG->wwwroot."/course/importstudents.php?id=$newcourseid");
} else if (has_capability('moodle/role:assign', $context)) { // Redirect users with assign capability to assign users to different roles
redirect($CFG->wwwroot."/admin/roles/assign.php?contextid=$context->id");
redirect($CFG->wwwroot."/$CFG->admin/roles/assign.php?contextid=$context->id");
} else { // Add current teacher and send to course
+1 -1
View File
@@ -638,7 +638,7 @@
if (!empty($cm->id)) {
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
$currenttab = 'update';
include_once($CFG->dirroot.'/admin/roles/tabs.php');
include_once($CFG->dirroot.'/'.$CFG->admin.'/roles/tabs.php');
}
unset($SESSION->modform); // Clear any old ones that may be hanging around.
+1 -2
View File
@@ -11,8 +11,7 @@ if (!$site = get_site()) {
$str = get_strings(array('enrolments', 'users', 'administration', 'settings'));
print_header("$site->shortname: $str->enrolments", "$site->fullname",
"<a href=\"../../admin/index.php\">$str->administration</a> ->
<a href=\"../../admin/users.php\">$str->users</a> ->
"<a href=\"../../$CFG->admin/index.php\">$str->administration</a> ->
$str->enrolments -> IMS import");
require_once('enrol.php');
+4 -4
View File
@@ -2333,7 +2333,7 @@ function admin_externalpage_setup($section, $adminroot) {
if ($site = get_site()) {
require_login();
} else {
redirect($CFG->wwwroot . '/admin/index.php');
redirect($CFG->wwwroot . '/'.$CFG->admin.'/index.php');
die;
}
@@ -2412,12 +2412,12 @@ function admin_get_root() {
// start the admin tree!
$ADMIN = new admin_category('root','Administration');
// we process this file first to get categories up and running
include($CFG->dirroot . '/admin/settings/top.php');
include($CFG->dirroot . '/'.$CFG->admin.'/settings/top.php');
// now we process all other files in admin/settings to build the
// admin tree
foreach (glob($CFG->dirroot . '/admin/settings/*.php') as $file) {
if ($file != $CFG->dirroot . '/admin/settings/top.php') {
foreach (glob($CFG->dirroot . '/'.$CFG->admin.'/settings/*.php') as $file) {
if ($file != $CFG->dirroot . '/'.$CFG->admin.'/settings/top.php') {
include_once($file);
}
}
+1 -1
View File
@@ -279,7 +279,7 @@ function load_environment_xml() {
$file = $CFG->dataroot.'/environment/environment.xml';
if (!is_file($file) || !is_readable($file) || !$contents = file_get_contents($file)) {
/// Fallback to fixed $CFG->admin/environment.xml
$file = $CFG->dirroot.'/admin/environment.xml';
$file = $CFG->dirroot.'/'.$CFG->admin.'/environment.xml';
if (!is_file($file) || !is_readable($file) || !$contents = file_get_contents($file)) {
return false;
}
+1 -1
View File
@@ -4275,7 +4275,7 @@ function get_string($identifier, $module='', $a=NULL) {
if (strpos($module, 'block_') === 0) { // It's a block lang file
$locations[] = $CFG->dirroot .'/blocks/'.substr($module, 6).'/lang/';
} else if (strpos($module, 'report_') === 0) { // It's a report lang file
$locations[] = $CFG->dirroot .'/admin/report/'.substr($module, 7).'/lang/';
$locations[] = $CFG->dirroot .'/'.$CFG->admin.'/report/'.substr($module, 7).'/lang/';
$locations[] = $CFG->dirroot .'/course/report/'.substr($module, 7).'/lang/';
} else { // It's a normal activity
$locations[] = $CFG->dirroot .'/mod/'.$module.'/lang/';
+2 -2
View File
@@ -50,7 +50,7 @@
}
} else { // no roles yet
if (has_capability('moodle/user:assign', $context)) {
redirect($CFG->wwwroot.'/admin/roles/assign.php?contextid='.$context->id);
redirect($CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$context->id);
} else {
error ('no participants found for this course');
}
@@ -435,7 +435,7 @@ function checkchecked(form) {
$a->items = $currentrole->name;
echo '<h2>'.get_string('counteditems', '', $a);
if (user_can_assign($context, $roleid)) {
echo ' <a href="'.$CFG->wwwroot.'/admin/roles/assign.php?roleid='.$roleid.'&amp;contextid='.$context->id.'">';
echo ' <a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?roleid='.$roleid.'&amp;contextid='.$context->id.'">';
echo '<img src="'.$CFG->pixpath.'/i/edit.gif" height="16" width="16" alt="" /></a>';
}
echo '</h2>';
+3 -3
View File
@@ -176,7 +176,7 @@
if (!empty($showroles)) { // this variable controls whether this roles is showed, or not, so only user/view page should set this flag
$usercontext = get_context_instance(CONTEXT_USER, $user->id);
$toprow[] = new tabobject('roles', $CFG->wwwroot.'/admin/roles/assign.php?contextid='.$usercontext->id.'&amp;userid='.$user->id.'&amp;courseid='.$course->id
$toprow[] = new tabobject('roles', $CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$usercontext->id.'&amp;userid='.$user->id.'&amp;courseid='.$course->id
,get_string('roles'));
if (in_array($currenttab, array('assign', 'override'))) {
@@ -184,9 +184,9 @@
$activetwo = array('roles');
$secondrow = array();
$secondrow[] = new tabobject('assign', $CFG->wwwroot.'/admin/roles/assign.php?contextid='.$usercontext->id.'&amp;userid='.$user->id.'&amp;courseid='.$course->id
$secondrow[] = new tabobject('assign', $CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$usercontext->id.'&amp;userid='.$user->id.'&amp;courseid='.$course->id
,get_string('assignroles', 'role'));
$secondrow[] = new tabobject('override', $CFG->wwwroot.'/admin/roles/override.php?contextid='.$usercontext->id.'&amp;userid='.$user->id.'&amp;courseid='.$course->id
$secondrow[] = new tabobject('override', $CFG->wwwroot.'/'.$CFG->admin.'/roles/override.php?contextid='.$usercontext->id.'&amp;userid='.$user->id.'&amp;courseid='.$course->id
,get_string('overrideroles', 'role'));
}