mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
Bug #6136 - Hard coded admin paths; merged from MOODLE_16_STABLE
This commit is contained in:
parent
45d5305e19
commit
ad0f9c828e
@ -159,7 +159,7 @@
|
||||
|
||||
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'multiple', 'delete', 'settings'));
|
||||
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strmultiple, $strdelete, $strsettings));
|
||||
$table->define_baseurl($CFG->wwwroot.'/admin/blocks.php');
|
||||
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
|
||||
|
||||
$table->set_attribute('cellspacing', '0');
|
||||
$table->set_attribute('id', 'blocks');
|
||||
@ -221,7 +221,7 @@
|
||||
|
||||
$table->define_columns(array('block', 'delete'));
|
||||
$table->define_headers(array($strname, $strdelete));
|
||||
$table->define_baseurl($CFG->wwwroot.'/admin/blocks.php');
|
||||
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
|
||||
|
||||
$table->set_attribute('cellspacing', '0');
|
||||
$table->set_attribute('id', 'incompatible');
|
||||
|
@ -192,7 +192,7 @@
|
||||
$table->column_style('order', 'text-align', 'center');
|
||||
$table->column_style('settings', 'text-align', 'center');
|
||||
$table->define_headers(array($txt->name, $txt->hideshow, $txt->updown, $txt->settings));
|
||||
$table->define_baseurl("$CFG->wwwroot/admin/filters.php");
|
||||
$table->define_baseurl("$CFG->wwwroot/$CFG->admin/filters.php");
|
||||
$table->set_attribute('id', 'blocks');
|
||||
$table->set_attribute('class', 'flexible generaltable generalbox');
|
||||
$table->set_attribute('style', 'margin:auto;');
|
||||
|
@ -23,7 +23,7 @@
|
||||
$strreports = get_string('reports');
|
||||
$strcourseoverview = get_string('courseoverview');
|
||||
|
||||
$strnav = '<a href="'.$CFG->wwwroot.'/admin/index.php">'.get_string('administration').'</a> -> <a href="'.$CFG->wwwroot.'/admin/report.php">'.$strreports.'</a> -> '.$strcourseoverview;
|
||||
$strnav = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/index.php">'.get_string('administration').'</a> -> <a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/report.php">'.$strreports.'</a> -> '.$strcourseoverview;
|
||||
|
||||
$reportoptions = stats_get_report_options($course->id,STATS_MODE_RANKED);
|
||||
|
||||
@ -75,10 +75,10 @@
|
||||
$courses = get_records_sql($sql);
|
||||
|
||||
if (empty($courses)) {
|
||||
error(get_string('statsnodata'),$CFG->wwwroot.'/admin/report/courseoverview/index.php');
|
||||
error(get_string('statsnodata'),$CFG->wwwroot.'/'.$CFG->admin.'/report/courseoverview/index.php');
|
||||
}
|
||||
|
||||
echo '<center><img src="'.$CFG->wwwroot.'/admin/report/courseoverview/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></center>';
|
||||
echo '<center><img src="'.$CFG->wwwroot.'/'.$CFG->admin.'/report/courseoverview/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></center>';
|
||||
|
||||
$table = new object();
|
||||
$table->align = array('left','center','center','center');
|
||||
|
@ -28,7 +28,7 @@
|
||||
$courses = get_records_sql($sql);
|
||||
|
||||
if (empty($courses)) {
|
||||
error(get_string('statsnodata'),$CFG->wwwroot.'/admin/report/course/index.php');
|
||||
error(get_string('statsnodata'),$CFG->wwwroot.'/'.$CFG->admin.'/report/course/index.php');
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
if (!empty($CFG->enablestats)) {
|
||||
echo '<p style="text-align:center;">';
|
||||
echo '<a href="'.$CFG->wwwroot.'/admin/report/stats/index.php?course='.$course->id.'">'.get_string('stats').'</a>';
|
||||
echo '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/report/stats/index.php?course='.$course->id.'">'.get_string('stats').'</a>';
|
||||
echo '</p>';
|
||||
$statsstatus = stats_check_uptodate($course->id);
|
||||
if ($statsstatus !== NULL) {
|
||||
|
@ -63,7 +63,7 @@
|
||||
echo '<td valign="top" width="*" id="middle-column">';
|
||||
print_simple_box_start('center');
|
||||
print_heading($strheading);
|
||||
echo '<form method="post" action="'.$CFG->wwwroot.'/admin/stickyblocks.php">'
|
||||
echo '<form method="post" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/stickyblocks.php">'
|
||||
.'<p align="center">'.get_string('stickyblockspagetype','admin').': ';
|
||||
choose_from_menu($options,'pt',$pt,'choose','this.form.submit();');
|
||||
echo '</p></form>';
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php //$Id$
|
||||
|
||||
///dummy field names are used to help adding and dropping indexes. There's only 1 case now, in scorm_scoes_track
|
||||
|
||||
require_once('../config.php');
|
||||
@ -88,7 +89,7 @@
|
||||
print_heading('db unicode migration has been completed!');
|
||||
unlink($filename); //no longer in maintenance mode
|
||||
@require_logout();
|
||||
print_continue($CFG->wwwroot.'/admin/langimport.php');
|
||||
print_continue($CFG->wwwroot.'/'.$CFG->admin.'/langimport.php');
|
||||
}
|
||||
|
||||
//else if $migrate
|
||||
@ -812,7 +813,7 @@ function db_migrate2utf8(){ //Eloy: Perhaps some type of limit parameter here
|
||||
echo $lang.', ';
|
||||
}
|
||||
}
|
||||
echo '</b><br/><a href="'.$CFG->wwwroot.'/admin/langimport.php">Language Import Utility</a></div>';
|
||||
echo '</b><br/><a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/langimport.php">Language Import Utility</a></div>';
|
||||
print_simple_box_end();
|
||||
delete_records('config','name','langsused');
|
||||
|
||||
|
@ -56,7 +56,7 @@ class block_admin extends block_list {
|
||||
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/log.gif" alt="" />';
|
||||
|
||||
|
||||
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/admin/report.php">'.get_string('reports').'</a>';
|
||||
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/report.php">'.get_string('reports').'</a>';
|
||||
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/stats.gif" alt="" />';
|
||||
|
||||
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/files/index.php?id='.SITEID.'">'.get_string('sitefiles').'</a>';
|
||||
|
@ -440,7 +440,7 @@ class page_course extends page_base {
|
||||
function url_get_path() {
|
||||
global $CFG;
|
||||
if (defined('ADMIN_STICKYBLOCKS')) {
|
||||
return $CFG->wwwroot.'/admin/stickyblocks.php';
|
||||
return $CFG->wwwroot.'/'.$CFG->admin.'/stickyblocks.php';
|
||||
}
|
||||
if($this->id == SITEID) {
|
||||
return $CFG->wwwroot .'/index.php';
|
||||
|
@ -449,7 +449,7 @@ function hotpot_update_to_v2_from_hotpotatoes() {
|
||||
set_field("modules", "visible", "0", "id", $module->id);
|
||||
print '<p>All HotPotatoes activities have been imported to the HotPot module.<br />'."\n";
|
||||
print 'The HotPotatoes module has been hidden and can safely be deleted from this Moodle site.<br />'."\n";
|
||||
print ' <a href="'.$CFG->wwwroot.'/admin/modules.php">Configuration -> Modules</A>, then click "Delete" for "Hot Potatoes XML Quiz"</p>'."\n";
|
||||
print ' <a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/modules.php">Configuration -> Modules</A>, then click "Delete" for "Hot Potatoes XML Quiz"</p>'."\n";
|
||||
}
|
||||
}
|
||||
if ($ok) {
|
||||
|
@ -49,11 +49,12 @@ class page_my_moodle extends page_base {
|
||||
}
|
||||
|
||||
function url_get_path() {
|
||||
global $CFG;
|
||||
page_id_and_class($id,$class);
|
||||
if ($id == PAGE_MY_MOODLE) {
|
||||
return $GLOBALS['CFG']->wwwroot.'/my/index.php';
|
||||
return $CFG->wwwroot.'/my/index.php';
|
||||
} elseif (defined('ADMIN_STICKYBLOCKS')){
|
||||
return $GLOBALS['CFG']->wwwroot.'/admin/stickyblocks.php';
|
||||
return $CFG->wwwroot.'/'.$CFG->admin.'/stickyblocks.php';
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user