My moodle page should not be available to guests and offer a full login

This commit is contained in:
mjollnir_
2005-10-30 20:10:43 +00:00
parent 18d0b22c11
commit fdaa600675
2 changed files with 18 additions and 1 deletions
+1
View File
@@ -4,6 +4,7 @@
$string['mymoodle'] = 'My moodle';
$string['nocourses'] = 'No course information to show.';
$string['noguest'] = 'The \'My Moodle\' page is not available to guest users';
$string['pinblocks'] = 'Configure pinned blocks for my moodle';
$string['pinblocksexplan'] = 'Any block settings you configure here will be visible (and non-editable) for any user of moodle on their \'my moodle\' screen.';
?>
+17 -1
View File
@@ -8,6 +8,22 @@
require_login();
$mymoodlestr = get_string('mymoodle','my');
if (isguest()) {
$wwwroot = $CFG->wwwroot.'/login/index.php';
if (!empty($CFG->loginhttps)) {
$wwwroot = str_replace('http','https', $wwwroot);
}
print_header($mymoodlestr);
notice_yesno(get_string('noguest', 'my').'<br /><br />'.get_string('liketologin'),
$wwwroot, $_SERVER['HTTP_REFERER']);
print_footer();
die();
}
$edit = optional_param('edit', '');
$blockaction = optional_param('blockaction');
@@ -23,7 +39,7 @@
}
}
$PAGE->print_header(get_string('mymoodle','my'));
$PAGE->print_header($mymoodlestr);
echo '<table border="0" cellpadding="3" cellspacing="0" width="100%" id="layout-table">';
echo '<tr valign="top">';