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:
mjollnir_ 2005-10-28 04:11:17 +00:00
parent fcf5aebf0f
commit 527883218c
4 changed files with 16 additions and 3 deletions

View File

@ -47,6 +47,11 @@ class block_participants extends block_list {
require_once($GLOBALS['CFG']->dirroot.'/my/pagelib.php');
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);
}
}
?>

View File

@ -2250,7 +2250,8 @@ function print_navigation ($navigation) {
$site->shortname = get_string('home');
}
$navigation = str_replace('->', '»', $navigation);
echo '<a target="'. $CFG->framename .'" href="'. $CFG->wwwroot.((!isadmin() && !empty($USER->id) && !empty($CFG->mymoodleredirect)) ? '/my' : '') .'/">'. $site->shortname .'</a> &raquo; '. $navigation;
echo '<a target="'. $CFG->framename .'" href="'. $CFG->wwwroot.((!isadmin() && !empty($USER->id) && !empty($CFG->mymoodleredirect) && !isguest())
? '/my' : '') .'/">'. $site->shortname .'</a> &raquo; '. $navigation;
}
}

View File

@ -157,8 +157,8 @@
} else {
$urltogo = $CFG->wwwroot.'/my'; /// Go to the standard home page
if (isadmin() || empty($CFG->mymoodleredirect)) {
$urltogo = $CFG->wwwroot; /// not needed by admins or when it's turned off
if (isadmin() || empty($CFG->mymoodleredirect) || isguest()) {
$urltogo = $CFG->wwwroot; /// not needed by admins or guests or when it's turned off
}
unset($SESSION->wantsurl); /// Just in case
}

View File

@ -32,6 +32,13 @@ class page_my_moodle extends page_base {
global $USER;
$replacements = array(
'%fullname%' => get_string('mymoodle','my')
);
foreach($replacements as $search => $replace) {
$title = str_replace($search, $replace, $title);
}
$site = get_site();
$button = update_mymoodle_icon($USER->id);