From 4b6d8dd5459016562b8cc73ce07bab5ebb67c35c Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 24 Feb 2004 07:12:56 +0000 Subject: [PATCH] Better notice for people not in a group who are trying to see a SEPARATE activity. --- lang/en/moodle.php | 1 + lib/moodlelib.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 22d62d7c1d..e1ff28a5e4 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -644,6 +644,7 @@ $string['notenrolled'] = '$a is not enrolled in this course.'; $string['noteuserschangednonetocourse'] = 'Note: course users need to be restored when restoring user data. This setting has been changed for you.'; $string['nothingnew'] = 'Nothing new since your last login'; $string['notincluded'] = 'Not included'; +$string['notingroup'] = 'Sorry, but you need to be part of a group to see this activity.'; $string['nousersmatching'] = 'No users matching \'$a\' were found'; $string['nousersyet'] = 'There are no users yet'; $string['now'] = 'now'; diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 2e9ca0f3c7..32f95eb6d2 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -1200,8 +1200,8 @@ function setup_and_print_groups($course, $groupmode, $urlroot) { return false; } - if (!isteacheredit($course->id) and $groupmode and !$currentgroup) { - print_heading(); + if ($groupmode == SEPARATEGROUPS and !isteacheredit($course->id) and !$currentgroup) { + print_heading(get_string('notingroup')); print_footer($course); exit; } -- 2.39.5