From b35e1a9ab90b9d60e44c492d7d05372aa50ca5c3 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 25 Apr 2005 19:10:14 +0000 Subject: [PATCH] No chat for you! (guests) --- mod/chat/view.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mod/chat/view.php b/mod/chat/view.php index c75707234d8..9a5e4c705e8 100644 --- a/mod/chat/view.php +++ b/mod/chat/view.php @@ -109,7 +109,17 @@ "chat$course->id$chat->id$groupparam", "$strenterchat", 500, 700, get_string('modulename', 'chat')); print_simple_box_end(); } else { - notice(get_string('noguests', 'chat')); + + $wwwroot = $CFG->wwwroot.'/login/index.php'; + if (!empty($CFG->loginhttps)) { + $wwwroot = str_replace('http','https', $wwwroot); + } + + notice_yesno(get_string('noguests', 'chat').'

'.get_string('liketologin'), + $wwwroot, $_SERVER['HTTP_REFERER']); + + print_footer($course); + exit; }