mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Participants block shouldn't be shown for my moodle; guests don't want my moodle redirect, fixing page title in edit block instance in my moodle
This commit is contained in:
parent
fcf5aebf0f
commit
527883218c
@ -47,6 +47,11 @@ class block_participants extends block_list {
|
|||||||
require_once($GLOBALS['CFG']->dirroot.'/my/pagelib.php');
|
require_once($GLOBALS['CFG']->dirroot.'/my/pagelib.php');
|
||||||
return array('all' => true, MY_MOODLE_FORMAT => false);
|
return array('all' => true, MY_MOODLE_FORMAT => false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function applicable_formats() {
|
||||||
|
require_once($GLOBALS['CFG']->dirroot.'/my/pagelib.php');
|
||||||
|
return array('all' => true, MY_MOODLE_FORMAT => false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -2250,7 +2250,8 @@ function print_navigation ($navigation) {
|
|||||||
$site->shortname = get_string('home');
|
$site->shortname = get_string('home');
|
||||||
}
|
}
|
||||||
$navigation = str_replace('->', '»', $navigation);
|
$navigation = str_replace('->', '»', $navigation);
|
||||||
echo '<a target="'. $CFG->framename .'" href="'. $CFG->wwwroot.((!isadmin() && !empty($USER->id) && !empty($CFG->mymoodleredirect)) ? '/my' : '') .'/">'. $site->shortname .'</a> » '. $navigation;
|
echo '<a target="'. $CFG->framename .'" href="'. $CFG->wwwroot.((!isadmin() && !empty($USER->id) && !empty($CFG->mymoodleredirect) && !isguest())
|
||||||
|
? '/my' : '') .'/">'. $site->shortname .'</a> » '. $navigation;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,8 +157,8 @@
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
$urltogo = $CFG->wwwroot.'/my'; /// Go to the standard home page
|
$urltogo = $CFG->wwwroot.'/my'; /// Go to the standard home page
|
||||||
if (isadmin() || empty($CFG->mymoodleredirect)) {
|
if (isadmin() || empty($CFG->mymoodleredirect) || isguest()) {
|
||||||
$urltogo = $CFG->wwwroot; /// not needed by admins or when it's turned off
|
$urltogo = $CFG->wwwroot; /// not needed by admins or guests or when it's turned off
|
||||||
}
|
}
|
||||||
unset($SESSION->wantsurl); /// Just in case
|
unset($SESSION->wantsurl); /// Just in case
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,13 @@ class page_my_moodle extends page_base {
|
|||||||
|
|
||||||
global $USER;
|
global $USER;
|
||||||
|
|
||||||
|
$replacements = array(
|
||||||
|
'%fullname%' => get_string('mymoodle','my')
|
||||||
|
);
|
||||||
|
foreach($replacements as $search => $replace) {
|
||||||
|
$title = str_replace($search, $replace, $title);
|
||||||
|
}
|
||||||
|
|
||||||
$site = get_site();
|
$site = get_site();
|
||||||
|
|
||||||
$button = update_mymoodle_icon($USER->id);
|
$button = update_mymoodle_icon($USER->id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user