]> git.mjollnir.org Git - moodle.git/commitdiff
coverted /admin/ to proper /$CFG->admin/ in paths
authorskodak <skodak>
Tue, 26 Sep 2006 21:10:14 +0000 (21:10 +0000)
committerskodak <skodak>
Tue, 26 Sep 2006 21:10:14 +0000 (21:10 +0000)
17 files changed:
admin/index.php
admin/roles/managetabs.php
admin/settings.php
admin/settings/courses.php
admin/xmldb/index.php
admin/xmldb/javascript.php
blocks/admin/block_admin.php
blocks/moodleblock.class.php
course/category.php
course/edit2.php
course/mod.php
enrol/imsenterprise/importnow.php
lib/adminlib.php
lib/environmentlib.php
lib/moodlelib.php
user/index.php
user/tabs.php

index 03733186159c5d76b336c7ab50dd1e61f7c02345..aeed1b7ec5f3b49233508af4dc8f7010c4d6e240 100644 (file)
 
     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();
     }
index 2e103ff88ad8c8650f5329a28041ed1d46221ca1..563ef9aabdacd02f29e8673e03bc15b6d0ba1c8b 100755 (executable)
@@ -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);
 
index 7d715d2be158eb03a5e91034b74c7c8f9ad29eb5..a39e1b9daf5d0b4d874afaea549c4a98dc7086ff 100644 (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);
index 893340f5e4fb6e116fed7fb7d0d033e8deab87d8..b1b0edcbaf2fd1b8bd501367456ae6052cd12232 100644 (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'));
index 1bb29e77c14a40e766ef095d1060c6ff62f8048d..025997b8dae99022176f551d3b35abfb38ae0c0a 100644 (file)
                     /// 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());
index ecafad4d43815746440ab0e66784e5877a9873bb..abf86cd597319280c76fcd30274dc35e30730f85 100644 (file)
     $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";
                 }
index 16cae5466fb5c99f6315f4215c36095e919fe5d7..46001a8c134a90b5af6c9a0a293b9a487d47d995 100644 (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="" />';         
             
         }
index ee35ca7b08d9449a9990c5f18261de22e1de9b01..a7a41c3b267d3f69f8fff84e620ac00467624751 100644 (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">' .
index 9d1206e9d76a2167a3875d3bb458332b3101f0e8..6c91af525f8746f533e106a429dd938dc96fa804 100644 (file)
     }
 
 /// 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
 
index 8cfa2160e7f5a2434744efa7c2d05ec1dd03354c..5c15b6c17014d98668b2078e4a16f53c21a7e645 100644 (file)
                         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
 
index d1427c545ca04c52574225fb5feb95d92986694e..fa993819aff254a4d0a57f836d3c73b7ff6d93df 100644 (file)
     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.
index 776383a4aad02ccb7a8d2cd3f0ff99ef8de8b8dd..b04bc5c51d7db589b86e40bfff197849ccdb1f9d 100644 (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');
index c87ffc48d4dd54a5bbeff74bbff509f3a7cbef9d..0d2e88d4ccf7c2d4df0199edd401df76269033e2 100644 (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);
             }
         }
index 09f5d1178c4c2c8f10f2f1af44a6c8ed49daa66e..515d4c56ede25f66f902f5b006af68da26e8b7f4 100644 (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;
         }
index cde2f68d3aa0eb753900ecd42939c335848d381b..a6b1d975c7f00bf93b42cc274555e8a442f8f4c9 100644 (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/';
index 754d3b341e7d1224d917b4b9eaf83c1d8e361676..9accbcaac3ee87629a1df73bb19c42a542a9f375 100644 (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>';
index d2a90a7b82aaa07849ba8167aaa028eb367c1ea6..df2908c6ee593c903210e72fd58e1bc3445a52cb 100644 (file)
 
     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'))) {
             $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'));
                                 
         }